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

View File

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

View File

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