diff --git a/packages/babel-core/test/fixtures/transformation/misc/regression-7064/exec.js b/packages/babel-core/test/fixtures/transformation/misc/regression-7064/exec.js new file mode 100644 index 0000000000..9b94389c6b --- /dev/null +++ b/packages/babel-core/test/fixtures/transformation/misc/regression-7064/exec.js @@ -0,0 +1,23 @@ +class Bar { + test() { + // pass + (() => { + assert.strictEqual(this.constructor, Bar); + })(); + + // pass + (() => { + assert.strictEqual(this.constructor, Bar); + }).call(this); + + (async () => { + assert.strictEqual(this.constructor, Bar); + })(); + + (async () => { + assert.strictEqual(this.constructor, Bar); + }).call(this); + } +} + +(new Bar()).test(); diff --git a/packages/babel-core/test/fixtures/transformation/misc/regression-7064/options.json b/packages/babel-core/test/fixtures/transformation/misc/regression-7064/options.json new file mode 100644 index 0000000000..5df260afd8 --- /dev/null +++ b/packages/babel-core/test/fixtures/transformation/misc/regression-7064/options.json @@ -0,0 +1,4 @@ +{ + "plugins": ["transform-async-to-generator"], + "presets": ["es2015"] +}