Skip to content
This repository has been archived by the owner on Dec 27, 2018. It is now read-only.

When an assertion fails on a client unit test, the reporter doesn't log in console or display a sourcemap aware line number #77

Open
optilude opened this issue Jan 8, 2017 · 0 comments

Comments

@optilude
Copy link

optilude commented Jan 8, 2017

If a client unit test fails, I get an error like:

AssertionError: expected { Object (CountEntries) } to deeply equal { Object (CountEntries) }
    at Context.<anonymous> (http://localhost:3000/app/app.js?hash=77b5e0c7ff91e6ae7d9fa181454b2ce1a986ddd1:688:43)
    at callFn (http://localhost:3000/packages/practicalmeteor_mocha-core.js?hash=5347e988a95085c68a748d38e6a9dd260b1a5db7:4345:21)
    at Test.Runnable.run (http://localhost:3000/packages/practicalmeteor_mocha-core.js?hash=5347e988a95085c68a748d38e6a9dd260b1a5db7:4338:7)
    at Runner.runTest (http://localhost:3000/packages/practicalmeteor_mocha-core.js?hash=5347e988a95085c68a748d38e6a9dd260b1a5db7:4808:10)
    at http://localhost:3000/packages/practicalmeteor_mocha-core.js?hash=5347e988a95085c68a748d38e6a9dd260b1a5db7:4919:12
    at next (http://localhost:3000/packages/practicalmeteor_mocha-core.js?hash=5347e988a95085c68a748d38e6a9dd260b1a5db7:4728:14)
    at http://localhost:3000/packages/practicalmeteor_mocha-core.js?hash=5347e988a95085c68a748d38e6a9dd260b1a5db7:4738:7
    at next (http://localhost:3000/packages/practicalmeteor_mocha-core.js?hash=5347e988a95085c68a748d38e6a9dd260b1a5db7:4670:14)
    at http://localhost:3000/packages/practicalmeteor_mocha-core.js?hash=5347e988a95085c68a748d38e6a9dd260b1a5db7:4706:5
    at timeslice (http://localhost:3000/packages/practicalmeteor_mocha-core.js?hash=5347e988a95085c68a748d38e6a9dd260b1a5db7:12674:27)

With an app-test, I get an exception in the console that references the actual file and line number where the assertion failed (presumably using the sourcemap) and allows for deeper inspection.

With a client unit test, I only get the above, which is annoying, because I now have to re-run the test with a breakpoint to figure out what's actually happened.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant