Merge pull request #7 from kylecorbelli/get-tests-working
Get tests working
This commit is contained in:
commit
56c3af6013
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1,3 +1,5 @@
|
||||||
/node_modules
|
/node_modules
|
||||||
|
|
||||||
|
/coverage
|
||||||
|
|
||||||
/src/**/*.js
|
/src/**/*.js
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
# Redux Token Auth
|
# Redux Token Auth
|
||||||
|
|
||||||
|
[](https://circleci.com/gh/kylecorbelli/redux-token-auth)
|
||||||
|
|
||||||
|
[](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'>
|
<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...
|
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
7
circle.yml
Normal 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
2711
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
21
package.json
21
package.json
|
@ -5,13 +5,27 @@
|
||||||
"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",
|
||||||
|
"test:watch": "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",
|
||||||
|
@ -25,11 +39,12 @@
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/jest": "^20.0.8",
|
"@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"
|
"typescript": "^2.5.2"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/axios": "^0.14.0",
|
|
||||||
"axios": "^0.16.2",
|
"axios": "^0.16.2",
|
||||||
"redux": "^3.7.2"
|
"redux": "^3.7.2"
|
||||||
}
|
}
|
||||||
|
|
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