Get tests working

This commit is contained in:
Kyle Corbelli 2017-09-14 13:43:39 -07:00
parent 867d7b56d8
commit accf20b144
4 changed files with 763 additions and 89 deletions

815
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -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": {

View File

@ -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)

View File

@ -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 {