move all plugin tests out of babel-core and into their appropriate folders

This commit is contained in:
Sebastian McKenzie
2015-11-08 23:04:10 -08:00
parent 5f40b53dee
commit 15969a0904
1189 changed files with 365 additions and 65 deletions

View File

@@ -13,5 +13,8 @@
"babel-helper-remap-async-to-generator": "^6.0.14",
"babel-types": "^6.0.14",
"babel-runtime": "^5.0.0"
},
"devDependencies": {
"babel-helper-plugin-test-runner": "^6.0.0"
}
}
}

View File

@@ -0,0 +1 @@
(async () => { await foo(); })()

View File

@@ -0,0 +1,4 @@
import { coroutine as _coroutine } from "bluebird";
_coroutine(function* () {
yield foo();
})();

View File

@@ -0,0 +1,5 @@
class Foo {
async foo() {
var wat = await bar();
}
}

View File

@@ -0,0 +1,8 @@
import { coroutine as _coroutine } from "bluebird";
class Foo {
foo() {
return _coroutine(function* () {
var wat = yield bar();
})();
}
}

View File

@@ -0,0 +1,3 @@
{
"plugins": ["external-helpers-2"]
}

View File

@@ -0,0 +1,3 @@
var foo = async function () {
var wat = await bar();
};

View File

@@ -0,0 +1,10 @@
import { coroutine as _coroutine } from "bluebird";
var foo = (function () {
var ref = _coroutine(function* () {
var wat = yield bar();
});
return function foo() {
return ref.apply(this, arguments);
};
})();

View File

@@ -0,0 +1,3 @@
var foo = async function bar() {
console.log(bar);
};

View File

@@ -0,0 +1,10 @@
import { coroutine as _coroutine } from "bluebird";
var foo = (function () {
var ref = _coroutine(function* () {
console.log(bar);
});
return function bar() {
return ref.apply(this, arguments);
};
})();

View File

@@ -0,0 +1,3 @@
{
"plugins": ["external-helpers-2", ["transform-async-to-module-method", { "module": "bluebird", "method": "coroutine" }]]
}

View File

@@ -0,0 +1,3 @@
async function foo() {
var wat = await bar();
}

View File

@@ -0,0 +1,11 @@
import { coroutine as _coroutine } from "bluebird";
let foo = (function () {
var ref = _coroutine(function* () {
var wat = yield bar();
});
return function foo() {
return ref.apply(this, arguments);
};
})();

View File

@@ -0,0 +1 @@
require("babel-helper-plugin-test-runner")(__dirname);