Get tests working
This commit is contained in:
parent
867d7b56d8
commit
accf20b144
815
package-lock.json
generated
815
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
16
package.json
16
package.json
|
@ -5,13 +5,26 @@
|
|||
"main": "dist/index.js",
|
||||
"types": "index.d.ts",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"test": "jest --watch",
|
||||
"build": "tsc"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/kylecorbelli/redux-token-auth.git"
|
||||
},
|
||||
"jest": {
|
||||
"transform": {
|
||||
"^.+\\.tsx?$": "<rootDir>/node_modules/ts-jest/preprocessor.js"
|
||||
},
|
||||
"testRegex": "(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$",
|
||||
"moduleFileExtensions": [
|
||||
"ts",
|
||||
"tsx",
|
||||
"js",
|
||||
"jsx",
|
||||
"json"
|
||||
]
|
||||
},
|
||||
"keywords": [
|
||||
"react",
|
||||
"redux",
|
||||
|
@ -26,6 +39,7 @@
|
|||
"devDependencies": {
|
||||
"@types/jest": "^20.0.8",
|
||||
"jest": "^20.0.4",
|
||||
"ts-jest": "^21.0.1",
|
||||
"typescript": "^2.5.2"
|
||||
},
|
||||
"dependencies": {
|
||||
|
|
20
src/index.ts
20
src/index.ts
|
@ -5,23 +5,3 @@ export {
|
|||
generateAuthActions,
|
||||
reduxTokenAuthReducer,
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Example of how the end-user will import the actions
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// import {
|
||||
// generateAuthFunctions,
|
||||
// } from 'redux-token-auth'
|
||||
//
|
||||
// const authUrl: string = 'http://www.someapp.com/auth'
|
||||
// const userAttributes = {
|
||||
// firstName: 'name',
|
||||
// imageUrl: 'image_url',
|
||||
// }
|
||||
// const {
|
||||
// registerUser,
|
||||
// verifyToken,
|
||||
// signInUser,
|
||||
// signOutUser,
|
||||
// } = generateAuthFunctions(authUrl, userAttributes)
|
||||
|
|
|
@ -3,7 +3,6 @@ import {
|
|||
Store,
|
||||
} from 'redux'
|
||||
|
||||
// This one in particular will be a little tough because we don't know what the package user's "User" model looks like:
|
||||
export interface UserAttributes {}
|
||||
|
||||
export interface User {
|
||||
|
|
Loading…
Reference in New Issue
Block a user