You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running tests with tape test.js instead of node test.js, Tape hides important context (stack trace, file name/position etc.) when there's a syntax error in the code. Consider the following — ideally, the output in case of tape would be the same as when running node:
~/projects/flatbush esm* → npx tape test.js
Unexpected token export~/projects/flatbush esm* → npx node test.js
/Users/mourner/projects/flatbush/index.js:2
export default functionflatbush(numItems, nodeSize, ArrayType) {
^^^^^^
SyntaxError: Unexpected token export
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:607:28)
at Object.Module._extensions..js (module.js:654:10)
at Module.load (module.js:556:32)
at tryModuleLoad (module.js:499:12)
at Function.Module._load (module.js:491:3)
at Module.require (module.js:587:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/Users/mourner/projects/flatbush/test.js:2:16)
The text was updated successfully, but these errors were encountered:
This seems reasonable (altho the stack trace lines that are internal to node probably could/should be stripped - only the last line in the trace is valuable)
When running tests with
tape test.js
instead ofnode test.js
, Tape hides important context (stack trace, file name/position etc.) when there's a syntax error in the code. Consider the following — ideally, the output in case oftape
would be the same as when runningnode
:The text was updated successfully, but these errors were encountered: