-
Notifications
You must be signed in to change notification settings - Fork 53
Closed
Description
Issue description or question
I run a series of test I wrote a long time ago and suddenly two of them were failing... After running several experiments I found Wallaby is changing the semantics of this:
class MyError extends Error {
myMethod() {
return "meow";
}
}
console.log(new MyError() instanceof MyError);
console.log(new MyError().myMethod);
Running the previous code in a browser returns this, as expected:
true
function myMethod() {
return "meow";
}
But running it in Wallaby returns something not expected at all:
false
undefined
Wallaby.js configuration file
module.exports = (w) => {
return {
files: [
"src/**/*.ts"
],
tests: [
"spec/**.spec.ts"
],
compilers: {
"**/*.ts": w.compilers.typeScript({module: "commonjs"}),
},
debug: true,
env: {
type: "node"
},
testFramework: "mocha",
setup: function (wallaby) {
require("bluebird").config({
longStackTraces: true
})
}
}
}Code editor or IDE name and version
PHPStorm 2016.3
OS name and version
Arch Linux
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels