Merge pull request #7 from kylecorbelli/get-tests-working

Get tests working
This commit is contained in:
Kyle Corbelli 2017-09-15 10:36:43 -07:00 committed by GitHub
commit 56c3af6013
8 changed files with 2436 additions and 332 deletions

2
.gitignore vendored
View File

@ -1,3 +1,5 @@
/node_modules
/coverage
/src/**/*.js

1
.nvmrc Normal file
View File

@ -0,0 +1 @@
8.4.0

View File

@ -1,4 +1,9 @@
# Redux Token Auth
[![CircleCI](https://circleci.com/gh/kylecorbelli/redux-token-auth.svg?style=shield)](https://circleci.com/gh/kylecorbelli/redux-token-auth)
[![codecov](https://codecov.io/gh/kylecorbelli/redux-token-auth/branch/master/graph/badge.svg)](https://codecov.io/gh/kylecorbelli/redux-token-auth)
<img src='https://ih1.redbubble.net/image.170071318.1044/ap,550x550,12x16,1,transparent,t.u4.png' height='500'>
This is going to be the raddest client-side solution for user authentication using React and Redux with a Rails backend that uses Devise...

7
circle.yml Normal file
View File

@ -0,0 +1,7 @@
machine:
node:
version: 8.4.0
test:
override:
- npm test -- --coverage
- ~/redux-token-auth/node_modules/.bin/codecov -t $CODECOV_TOKEN

2711
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -5,13 +5,27 @@
"main": "dist/index.js",
"types": "index.d.ts",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"test": "jest",
"test:watch": "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",
@ -25,11 +39,12 @@
"license": "MIT",
"devDependencies": {
"@types/jest": "^20.0.8",
"jest": "^20.0.4",
"codecov": "^2.3.0",
"jest": "^21.0.0",
"ts-jest": "^21.0.1",
"typescript": "^2.5.2"
},
"dependencies": {
"@types/axios": "^0.14.0",
"axios": "^0.16.2",
"redux": "^3.7.2"
}

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 {