jhnns / rewire

Easy monkey-patching for node.js unit tests
MIT License
3.08k stars 127 forks source link

Add Firefox compatibility to stack trace test #171

Closed rensbaardman closed 2 years ago

rensbaardman commented 5 years ago

I am working on getting the shared test cases to run on both Firefox and Chrome, using webpack and (my fork of) rewire-webpack-plugin.

One test failed specifically in Firefox: should not modify line numbers in stack traces. This happens, since Firefox uses a different stack trace format. This PR is a workaround for that. It's would have been possible to specifically code in for the Firefox format (although then you would have to check whether you are in Firefox or in a V8-engine), but using err.lineNumber and err.columnNumber directly is cleaner.

coveralls commented 5 years ago

Coverage Status

Coverage remained the same at 97.619% when pulling f71de3b3dfd86ecefb486bf5faacb9ed4d615e47 on rensbaardman:stack-trace-test-firefox into 5bea3d816d0258e5204f1b49b08b9fb302ac53e1 on jhnns:master.

coveralls commented 5 years ago

Coverage Status

Coverage remained the same at 97.619% when pulling f71de3b3dfd86ecefb486bf5faacb9ed4d615e47 on rensbaardman:stack-trace-test-firefox into 5bea3d816d0258e5204f1b49b08b9fb302ac53e1 on jhnns:master.

jhnns commented 2 years ago

Published as v6.0.0 🚀