Add more async context tests
This commit is contained in:
23
packages/babel-core/test/fixtures/transformation/misc/regression-7064/exec.js
vendored
Normal file
23
packages/babel-core/test/fixtures/transformation/misc/regression-7064/exec.js
vendored
Normal file
@@ -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();
|
||||
4
packages/babel-core/test/fixtures/transformation/misc/regression-7064/options.json
vendored
Normal file
4
packages/babel-core/test/fixtures/transformation/misc/regression-7064/options.json
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"plugins": ["transform-async-to-generator"],
|
||||
"presets": ["es2015"]
|
||||
}
|
||||
Reference in New Issue
Block a user