From 7a3fef26fa71964422cea7f1974b82bab375b76d Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Mon, 2 Nov 2015 07:11:12 +0000 Subject: [PATCH] update tests --- packages/babel-core/src/transformation/file/index.js | 2 +- .../transformation/async-to-generator/async/expected.js | 2 +- .../transformation/bluebird-coroutines/class/expected.js | 2 +- .../test/fixtures/transformation/misc/shebang/expected.js | 1 + 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/babel-core/src/transformation/file/index.js b/packages/babel-core/src/transformation/file/index.js index 857838aeef..06d6e14d34 100644 --- a/packages/babel-core/src/transformation/file/index.js +++ b/packages/babel-core/src/transformation/file/index.js @@ -534,7 +534,7 @@ export default class File extends Store { if (this.shebang) { // add back shebang - result.code = `${this.shebang}\n${result.code.trimLeft()}`; + result.code = `${this.shebang}\n${result.code}`; } if (result.map) { diff --git a/packages/babel-core/test/fixtures/transformation/async-to-generator/async/expected.js b/packages/babel-core/test/fixtures/transformation/async-to-generator/async/expected.js index 29da0ca451..0c564e4b1a 100644 --- a/packages/babel-core/test/fixtures/transformation/async-to-generator/async/expected.js +++ b/packages/babel-core/test/fixtures/transformation/async-to-generator/async/expected.js @@ -1,7 +1,7 @@ class Foo { foo() { return babelHelpers.asyncToGenerator(function* () { - var wat = await bar(); + var wat = yield bar(); })(); } } diff --git a/packages/babel-core/test/fixtures/transformation/bluebird-coroutines/class/expected.js b/packages/babel-core/test/fixtures/transformation/bluebird-coroutines/class/expected.js index cf00496e19..1669137123 100644 --- a/packages/babel-core/test/fixtures/transformation/bluebird-coroutines/class/expected.js +++ b/packages/babel-core/test/fixtures/transformation/bluebird-coroutines/class/expected.js @@ -2,7 +2,7 @@ import { coroutine as _coroutine } from "bluebird"; class Foo { foo() { return _coroutine(function* () { - var wat = await bar(); + var wat = yield bar(); })(); } } diff --git a/packages/babel-core/test/fixtures/transformation/misc/shebang/expected.js b/packages/babel-core/test/fixtures/transformation/misc/shebang/expected.js index bbfcec5998..d238f79b84 100644 --- a/packages/babel-core/test/fixtures/transformation/misc/shebang/expected.js +++ b/packages/babel-core/test/fixtures/transformation/misc/shebang/expected.js @@ -1,3 +1,4 @@ #!/usr/bin/env node + foobar();