Bladeren bron

remove global localStorage in tests

pull/342/head
Guillaume Vincent 8 jaren geleden
bovenliggende
commit
2148b7df9b
2 gewijzigde bestanden met toevoegingen van 1 en 2 verwijderingen
  1. +1
    -1
      package.json
  2. +0
    -1
      src/services/auth.js

+ 1
- 1
package.json Bestand weergeven

@@ -6,7 +6,7 @@
"start": "NODE_ENV=production node server.js",
"dev": "webpack-dev-server --inline --hot --host 0.0.0.0",
"build": "cross-env NODE_ENV=production webpack --progress --hide-modules",
"test": "mocha --ui tdd --require babel-core/register --globals localStorage --recursive tests"
"test": "mocha --ui tdd --require babel-core/register --recursive tests"
},
"dependencies": {
"axios": "^0.9.1",


+ 0
- 1
src/services/auth.js Bestand weergeven

@@ -8,7 +8,6 @@ export default {
login(credentials) {
return request.post('/api/sessions/', credentials)
.then((response) => {
console.log(response)
localStorage.setItem('token', response.data.token);
this.user.authenticated = true;
return response;


Laden…
Annuleren
Opslaan