acdlite / acdlite/redux-router

Remove jsdom from test harness

Aperta
#101 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
bug
Lingua principale
JavaScript
Stelle
2.3k
Fork
194
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

I've had nothing but pain and tears from jsdom, the most recent of which happened when I did a fresh clone, `npm install` and `npm test`.

```
$ npm test

> redux-router@1.0.0-beta3 test /Users/michael/Projects/redux-router
> mocha --compilers js:babel/register --recursive --require src/__tests__/init.js src/**/*-test.js


1) "before all" hook

reduxRouter()
✓ adds router state to Redux store
✓ detects external router state changes (47ms)
✓ works with navigation action creators
✓ doesn't interfere with other actions
getRoutes()
✓ is passed dispatch and getState
onEnter hook
✓ can perform redirects
isActive
✓ creates a selector for whether a pathname/query pair is active

7 passing (137ms)
1 failing

1) "before all" hook:
/Users/michael/Projects/redux-router/node_modules/jsdom/lib/jsdom.js:3
`jsdom 4.x onward only works on io.js, not Node.js™: https://github.com/tmpvar
^
Unexpected token ILLEGAL
node_modules/jsdom/lib/jsdom.js:3
`jsdom 4.x onward only works on io.js, not Node.js™: https://github.com/tmpvar
^
SyntaxError: Unexpected token ILLEGAL
at exports.runInThisContext (vm.js:73:16)
at Object.require.extensions.(anonymous function) [as .js] (node_modules/babel/node_modules/babel-core/lib/api/register/node.js:214:7)
at Context. (node_modules/mocha-jsdom/index.js:52:5)
```

Can we remove it? I can help you guys get tests running in real browsers using a similar karma + webpack + mocha setup to what we're using in the router.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.