acdlite / acdlite/redux-router
Remove jsdom from test harness
- 主要语言
- JavaScript
- 星标
- 2.3k
- 派生
- 194
- PR 合并指标
- 30 天内没有已合并 PR
描述
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.
贡献指南
这个仓库没有索引到贡献指南
调研方向
Look at the test harness in src/__tests__/init.js and the failing jsdom setup. Examine the existing karma + webpack + mocha setup mentioned in the router for reference. The goal is to replace jsdom with a real browser testing environment, ensuring all existing tests pass with the new configuration.
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- javascript, nodejs, webpack
- 领域
- testing, tooling
- Issue 类型
- 重构
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 描述清楚
- 新手友好度
- 40/100