Add more async context tests

This commit is contained in:
Amjad Masad
2016-03-08 00:55:42 -08:00
parent 57c6c4ea81
commit 69773a45f4
2 changed files with 27 additions and 0 deletions

View 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();

View File

@@ -0,0 +1,4 @@
{
"plugins": ["transform-async-to-generator"],
"presets": ["es2015"]
}