Integrating into a testing library #2

Open
masylum opened this Issue Jul 25, 2011 · 2 comments

Projects

None yet

2 participants

@masylum
masylum commented Jul 25, 2011

I would like to have test coverage into my testing library testosteone using node-bunker but I don't know where to start... in the example you pass a string with some javascript to the bunker function and then you run it. But how can I do the same with external modules instead?

Thank's in advance!

@chrisdickinson

@masylum it's a little gross, but here's how I've integrated bunker / coverage into my testing library, platoon: https://github.com/chrisdickinson/platoon/blob/master/lib/cover.js#L43.

I had to add a "buildContext" to bunker to separate the context building from actually running the code -- bunker uses vm.runInNewContext which screws up instanceof checks.

@masylum
masylum commented Jul 26, 2011

interesting! I'm checking now the brand new node-intestine :) https://github.com/substack/node-intestine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment