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",
|
"main": "dist/index.js",
|
||||||
"types": "index.d.ts",
|
"types": "index.d.ts",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "echo \"Error: no test specified\" && exit 1",
|
"test": "jest --watch",
|
||||||
"build": "tsc"
|
"build": "tsc"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/kylecorbelli/redux-token-auth.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": [
|
"keywords": [
|
||||||
"react",
|
"react",
|
||||||
"redux",
|
"redux",
|
||||||
|
@ -26,6 +39,7 @@
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/jest": "^20.0.8",
|
"@types/jest": "^20.0.8",
|
||||||
"jest": "^20.0.4",
|
"jest": "^20.0.4",
|
||||||
|
"ts-jest": "^21.0.1",
|
||||||
"typescript": "^2.5.2"
|
"typescript": "^2.5.2"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
20
src/index.ts
20
src/index.ts
|
@ -5,23 +5,3 @@ export {
|
||||||
generateAuthActions,
|
generateAuthActions,
|
||||||
reduxTokenAuthReducer,
|
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,
|
Store,
|
||||||
} from 'redux'
|
} 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 UserAttributes {}
|
||||||
|
|
||||||
export interface User {
|
export interface User {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user