Problem example jest test
marty-young opened this issue · comments
Marty Young commented
I have an issue when running the jest example.
In new node project, install rxjs, rxjs-marbles and jest. Run the example jest test from the readme, I get:
TypeError: source.map is not a function
at m (index.test.js:15:32)
at Object.<anonymous> (node_modules/rxjs-marbles/bundles/rxjs-marbles.umd.js:2248:27)
at new Promise (<anonymous>)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:160:7)
package file:
"devDependencies": {
"jest": "^22.4.3",
"rxjs-marbles": "^2.3.2"
},
"dependencies": {
"rxjs": "^5.5.7"
}
Nicholas Jamieson commented
The snippet is incomplete; there's an RxJS import elided:
import { marbles } from "rxjs-marbles";
import "rxjs/add/operator/map";
See the fixtures for a complete, working Jest test.
Improving the README is on my TODO list. I'll make a note of this. It's going to need to be updated for RxJS v6 soon, too.
Nicholas Jamieson commented
Closing this, as a new version with RxJS v6 support and stand-alone examples will be released soon.