diff --git a/test/fixtures/generation/basic/array-comprehensions/actual.js b/test/fixtures/generation/basic/array-comprehensions/actual.js deleted file mode 100644 index bc530997d9..0000000000 --- a/test/fixtures/generation/basic/array-comprehensions/actual.js +++ /dev/null @@ -1,3 +0,0 @@ -var multiples = [for (num of nums) num * num]; -var multiples = [for (num of nums) for (num2 of nums) num * num]; -var multiples = [for (num of nums) if (num > 5) num * num]; diff --git a/test/fixtures/generation/basic/array-comprehensions/expected.js b/test/fixtures/generation/basic/array-comprehensions/expected.js deleted file mode 100644 index bc530997d9..0000000000 --- a/test/fixtures/generation/basic/array-comprehensions/expected.js +++ /dev/null @@ -1,3 +0,0 @@ -var multiples = [for (num of nums) num * num]; -var multiples = [for (num of nums) for (num2 of nums) num * num]; -var multiples = [for (num of nums) if (num > 5) num * num]; diff --git a/test/fixtures/generation/basic/arrays/actual.js b/test/fixtures/generation/basic/arrays/actual.js deleted file mode 100644 index cce578b089..0000000000 --- a/test/fixtures/generation/basic/arrays/actual.js +++ /dev/null @@ -1 +0,0 @@ -var foo = [1, 2, 3]; diff --git a/test/fixtures/generation/basic/arrays/expected.js b/test/fixtures/generation/basic/arrays/expected.js deleted file mode 100644 index cce578b089..0000000000 --- a/test/fixtures/generation/basic/arrays/expected.js +++ /dev/null @@ -1 +0,0 @@ -var foo = [1, 2, 3]; diff --git a/test/fixtures/generation/basic/classes/actual.js b/test/fixtures/generation/basic/classes/actual.js deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/fixtures/generation/basic/classes/expected.js b/test/fixtures/generation/basic/classes/expected.js deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/fixtures/generation/basic/functions/actual.js b/test/fixtures/generation/basic/functions/actual.js deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/fixtures/generation/basic/functions/expected.js b/test/fixtures/generation/basic/functions/expected.js deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/fixtures/generation/basic/jsx/actual.js b/test/fixtures/generation/basic/jsx/actual.js deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/fixtures/generation/basic/jsx/expected.js b/test/fixtures/generation/basic/jsx/expected.js deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/fixtures/generation/basic/literals/actual.js b/test/fixtures/generation/basic/literals/actual.js deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/fixtures/generation/basic/literals/expected.js b/test/fixtures/generation/basic/literals/expected.js deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/fixtures/generation/basic/modules/actual.js b/test/fixtures/generation/basic/modules/actual.js deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/fixtures/generation/basic/modules/expected.js b/test/fixtures/generation/basic/modules/expected.js deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/fixtures/generation/basic/objects/actual.js b/test/fixtures/generation/basic/objects/actual.js deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/fixtures/generation/basic/objects/expected.js b/test/fixtures/generation/basic/objects/expected.js deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/fixtures/generation/basic/template-literals/actual.js b/test/fixtures/generation/basic/template-literals/actual.js deleted file mode 100644 index 7708f50254..0000000000 --- a/test/fixtures/generation/basic/template-literals/actual.js +++ /dev/null @@ -1,17 +0,0 @@ -var foo = `i -am a multiline string`; - -var foo = `i am also - a multiline string -foobar`; - -var foo = `im a single line string`; - -var foo = tagit`i -am a multiline string`; - -var foo = tagit`i am also - a multiline string -foobar`; - -var foo = tagit`im a single line string`; diff --git a/test/fixtures/generation/basic/template-literals/expected.js b/test/fixtures/generation/basic/template-literals/expected.js deleted file mode 100644 index 7708f50254..0000000000 --- a/test/fixtures/generation/basic/template-literals/expected.js +++ /dev/null @@ -1,17 +0,0 @@ -var foo = `i -am a multiline string`; - -var foo = `i am also - a multiline string -foobar`; - -var foo = `im a single line string`; - -var foo = tagit`i -am a multiline string`; - -var foo = tagit`i am also - a multiline string -foobar`; - -var foo = tagit`im a single line string`; diff --git a/test/fixtures/generation/types/ArrayExpression-ArrayPattern/actual.js b/test/fixtures/generation/types/ArrayExpression-ArrayPattern/actual.js new file mode 100644 index 0000000000..20076ec145 --- /dev/null +++ b/test/fixtures/generation/types/ArrayExpression-ArrayPattern/actual.js @@ -0,0 +1,5 @@ +[a, b, c]; +[[], [b, c], []]; +[a,, b,]; +[a,,,, b]; +[a, b,, c]; diff --git a/test/fixtures/generation/types/ArrayExpression-ArrayPattern/expected.js b/test/fixtures/generation/types/ArrayExpression-ArrayPattern/expected.js new file mode 100644 index 0000000000..472dd398ba --- /dev/null +++ b/test/fixtures/generation/types/ArrayExpression-ArrayPattern/expected.js @@ -0,0 +1,5 @@ +[a, b, c]; +[[], [b, c], []]; +[a,, b]; +[a,,,, b]; +[a, b,, c]; diff --git a/test/fixtures/generation/types/ArrowFunctionExpression/actual.js b/test/fixtures/generation/types/ArrowFunctionExpression/actual.js new file mode 100644 index 0000000000..359ef770df --- /dev/null +++ b/test/fixtures/generation/types/ArrowFunctionExpression/actual.js @@ -0,0 +1,4 @@ +var foo = x => x * x; +var foo = (a, b) => a * b; +var foo = async x => x * x; +var foo = async (a, b) => a * b; diff --git a/test/fixtures/generation/types/ArrowFunctionExpression/expected.js b/test/fixtures/generation/types/ArrowFunctionExpression/expected.js new file mode 100644 index 0000000000..359ef770df --- /dev/null +++ b/test/fixtures/generation/types/ArrowFunctionExpression/expected.js @@ -0,0 +1,4 @@ +var foo = x => x * x; +var foo = (a, b) => a * b; +var foo = async x => x * x; +var foo = async (a, b) => a * b; diff --git a/test/fixtures/generation/types/AssignmentExpression-BinaryExpression-LogicalExpression/actual.js b/test/fixtures/generation/types/AssignmentExpression-BinaryExpression-LogicalExpression/actual.js new file mode 100644 index 0000000000..5cdce74d9b --- /dev/null +++ b/test/fixtures/generation/types/AssignmentExpression-BinaryExpression-LogicalExpression/actual.js @@ -0,0 +1,3 @@ +foo === bar; +foo + bar; +foo = bar; diff --git a/test/fixtures/generation/types/AssignmentExpression-BinaryExpression-LogicalExpression/expected.js b/test/fixtures/generation/types/AssignmentExpression-BinaryExpression-LogicalExpression/expected.js new file mode 100644 index 0000000000..5cdce74d9b --- /dev/null +++ b/test/fixtures/generation/types/AssignmentExpression-BinaryExpression-LogicalExpression/expected.js @@ -0,0 +1,3 @@ +foo === bar; +foo + bar; +foo = bar; diff --git a/test/fixtures/generation/types/AwaitExpression/actual.js b/test/fixtures/generation/types/AwaitExpression/actual.js new file mode 100644 index 0000000000..17bd494915 --- /dev/null +++ b/test/fixtures/generation/types/AwaitExpression/actual.js @@ -0,0 +1,7 @@ +async function foo() { + await bar(); +} + +async function bar() { + await* foo(); +} diff --git a/test/fixtures/generation/types/AwaitExpression/expected.js b/test/fixtures/generation/types/AwaitExpression/expected.js new file mode 100644 index 0000000000..17bd494915 --- /dev/null +++ b/test/fixtures/generation/types/AwaitExpression/expected.js @@ -0,0 +1,7 @@ +async function foo() { + await bar(); +} + +async function bar() { + await* foo(); +} diff --git a/test/fixtures/generation/types/BlockStatement/actual.js b/test/fixtures/generation/types/BlockStatement/actual.js new file mode 100644 index 0000000000..f9ce0d4e58 --- /dev/null +++ b/test/fixtures/generation/types/BlockStatement/actual.js @@ -0,0 +1,5 @@ +{} + +{ + foo(); +} diff --git a/test/fixtures/generation/types/BlockStatement/expected.js b/test/fixtures/generation/types/BlockStatement/expected.js new file mode 100644 index 0000000000..f9ce0d4e58 --- /dev/null +++ b/test/fixtures/generation/types/BlockStatement/expected.js @@ -0,0 +1,5 @@ +{} + +{ + foo(); +} diff --git a/test/fixtures/generation/types/BreakStatement/actual.js b/test/fixtures/generation/types/BreakStatement/actual.js new file mode 100644 index 0000000000..21e486a7df --- /dev/null +++ b/test/fixtures/generation/types/BreakStatement/actual.js @@ -0,0 +1,7 @@ +for (var i in foo) { + break; +} + +foo: for (var i in foo) { + break foo; +} diff --git a/test/fixtures/generation/types/BreakStatement/expected.js b/test/fixtures/generation/types/BreakStatement/expected.js new file mode 100644 index 0000000000..21e486a7df --- /dev/null +++ b/test/fixtures/generation/types/BreakStatement/expected.js @@ -0,0 +1,7 @@ +for (var i in foo) { + break; +} + +foo: for (var i in foo) { + break foo; +} diff --git a/test/fixtures/generation/types/CallExpression/actual.js b/test/fixtures/generation/types/CallExpression/actual.js new file mode 100644 index 0000000000..356fa149e2 --- /dev/null +++ b/test/fixtures/generation/types/CallExpression/actual.js @@ -0,0 +1,5 @@ +foo(); +foo("foo"); +foo("foo", "bar"); +foo(bar()); +foo(bar("test")); diff --git a/test/fixtures/generation/types/CallExpression/expected.js b/test/fixtures/generation/types/CallExpression/expected.js new file mode 100644 index 0000000000..356fa149e2 --- /dev/null +++ b/test/fixtures/generation/types/CallExpression/expected.js @@ -0,0 +1,5 @@ +foo(); +foo("foo"); +foo("foo", "bar"); +foo(bar()); +foo(bar("test")); diff --git a/test/fixtures/generation/types/ClassBody-MethodDefinition/actual.js b/test/fixtures/generation/types/ClassBody-MethodDefinition/actual.js new file mode 100644 index 0000000000..cc4553ffb3 --- /dev/null +++ b/test/fixtures/generation/types/ClassBody-MethodDefinition/actual.js @@ -0,0 +1,13 @@ +class Foo { + async foo() {} + foo() {} + ["foo"]() {} + get foo() {} + set foo() {} + + static async foo() {} + static foo() {} + static ["foo"]() {} + static get foo() {} + static set foo() {} +} diff --git a/test/fixtures/generation/types/ClassBody-MethodDefinition/expected.js b/test/fixtures/generation/types/ClassBody-MethodDefinition/expected.js new file mode 100644 index 0000000000..cc4553ffb3 --- /dev/null +++ b/test/fixtures/generation/types/ClassBody-MethodDefinition/expected.js @@ -0,0 +1,13 @@ +class Foo { + async foo() {} + foo() {} + ["foo"]() {} + get foo() {} + set foo() {} + + static async foo() {} + static foo() {} + static ["foo"]() {} + static get foo() {} + static set foo() {} +} diff --git a/test/fixtures/generation/types/ClassDeclaration/actual.js b/test/fixtures/generation/types/ClassDeclaration/actual.js new file mode 100644 index 0000000000..072c7c10e6 --- /dev/null +++ b/test/fixtures/generation/types/ClassDeclaration/actual.js @@ -0,0 +1,2 @@ +var foo = class Foo {}; +var foo = class Foo extends Bar {}; diff --git a/test/fixtures/generation/types/ClassDeclaration/expected.js b/test/fixtures/generation/types/ClassDeclaration/expected.js new file mode 100644 index 0000000000..072c7c10e6 --- /dev/null +++ b/test/fixtures/generation/types/ClassDeclaration/expected.js @@ -0,0 +1,2 @@ +var foo = class Foo {}; +var foo = class Foo extends Bar {}; diff --git a/test/fixtures/generation/types/ClassExpression/actual.js b/test/fixtures/generation/types/ClassExpression/actual.js new file mode 100644 index 0000000000..1931f1faea --- /dev/null +++ b/test/fixtures/generation/types/ClassExpression/actual.js @@ -0,0 +1,2 @@ +class Foo {} +class Foo extends Bar {} diff --git a/test/fixtures/generation/types/ClassExpression/expected.js b/test/fixtures/generation/types/ClassExpression/expected.js new file mode 100644 index 0000000000..1931f1faea --- /dev/null +++ b/test/fixtures/generation/types/ClassExpression/expected.js @@ -0,0 +1,2 @@ +class Foo {} +class Foo extends Bar {} diff --git a/test/fixtures/generation/types/ComprehensionBlock-ComprehensionExpression/actual.js b/test/fixtures/generation/types/ComprehensionBlock-ComprehensionExpression/actual.js new file mode 100644 index 0000000000..141423da4a --- /dev/null +++ b/test/fixtures/generation/types/ComprehensionBlock-ComprehensionExpression/actual.js @@ -0,0 +1,9 @@ +[for (x of nums) x * x]; +[for (x of nums) if (x > 2) x * x]; +[for (nums of nums2) for (x of nums) x * x]; +[for (nums of nums2) for (x of nums) if (x > 2) x * x]; + +(for (x of nums) x * x); +(for (x of nums) if (x > 2) x * x); +(for (nums of nums2) for (x of nums) x * x); +(for (nums of nums2) for (x of nums) if (x > 2) x * x); diff --git a/test/fixtures/generation/types/ComprehensionBlock-ComprehensionExpression/expected.js b/test/fixtures/generation/types/ComprehensionBlock-ComprehensionExpression/expected.js new file mode 100644 index 0000000000..141423da4a --- /dev/null +++ b/test/fixtures/generation/types/ComprehensionBlock-ComprehensionExpression/expected.js @@ -0,0 +1,9 @@ +[for (x of nums) x * x]; +[for (x of nums) if (x > 2) x * x]; +[for (nums of nums2) for (x of nums) x * x]; +[for (nums of nums2) for (x of nums) if (x > 2) x * x]; + +(for (x of nums) x * x); +(for (x of nums) if (x > 2) x * x); +(for (nums of nums2) for (x of nums) x * x); +(for (nums of nums2) for (x of nums) if (x > 2) x * x); diff --git a/test/fixtures/generation/types/ConditionalExpression/actual.js b/test/fixtures/generation/types/ConditionalExpression/actual.js new file mode 100644 index 0000000000..58ab924af4 --- /dev/null +++ b/test/fixtures/generation/types/ConditionalExpression/actual.js @@ -0,0 +1 @@ +foo ? foo : bar; diff --git a/test/fixtures/generation/types/ConditionalExpression/expected.js b/test/fixtures/generation/types/ConditionalExpression/expected.js new file mode 100644 index 0000000000..58ab924af4 --- /dev/null +++ b/test/fixtures/generation/types/ConditionalExpression/expected.js @@ -0,0 +1 @@ +foo ? foo : bar; diff --git a/test/fixtures/generation/types/ContinueStatement/actual.js b/test/fixtures/generation/types/ContinueStatement/actual.js new file mode 100644 index 0000000000..593fe2c367 --- /dev/null +++ b/test/fixtures/generation/types/ContinueStatement/actual.js @@ -0,0 +1,7 @@ +for (var i in foo) { + continue; +} + +foo: for (var i in foo) { + continue foo; +} diff --git a/test/fixtures/generation/types/ContinueStatement/expected.js b/test/fixtures/generation/types/ContinueStatement/expected.js new file mode 100644 index 0000000000..593fe2c367 --- /dev/null +++ b/test/fixtures/generation/types/ContinueStatement/expected.js @@ -0,0 +1,7 @@ +for (var i in foo) { + continue; +} + +foo: for (var i in foo) { + continue foo; +} diff --git a/test/fixtures/generation/types/DebuggerStatement/actual.js b/test/fixtures/generation/types/DebuggerStatement/actual.js new file mode 100644 index 0000000000..eab7469213 --- /dev/null +++ b/test/fixtures/generation/types/DebuggerStatement/actual.js @@ -0,0 +1 @@ +debugger; diff --git a/test/fixtures/generation/types/DebuggerStatement/expected.js b/test/fixtures/generation/types/DebuggerStatement/expected.js new file mode 100644 index 0000000000..eab7469213 --- /dev/null +++ b/test/fixtures/generation/types/DebuggerStatement/expected.js @@ -0,0 +1 @@ +debugger; diff --git a/test/fixtures/generation/types/DoWhileStatement/actual.js b/test/fixtures/generation/types/DoWhileStatement/actual.js new file mode 100644 index 0000000000..c567c9b0c5 --- /dev/null +++ b/test/fixtures/generation/types/DoWhileStatement/actual.js @@ -0,0 +1,5 @@ +do { + test(); +} while (true); + +do {} while (true); diff --git a/test/fixtures/generation/types/DoWhileStatement/expected.js b/test/fixtures/generation/types/DoWhileStatement/expected.js new file mode 100644 index 0000000000..c567c9b0c5 --- /dev/null +++ b/test/fixtures/generation/types/DoWhileStatement/expected.js @@ -0,0 +1,5 @@ +do { + test(); +} while (true); + +do {} while (true); diff --git a/test/fixtures/generation/types/EmptyStatement/actual.js b/test/fixtures/generation/types/EmptyStatement/actual.js new file mode 100644 index 0000000000..092bc2b041 --- /dev/null +++ b/test/fixtures/generation/types/EmptyStatement/actual.js @@ -0,0 +1 @@ +; diff --git a/test/fixtures/generation/types/EmptyStatement/expected.js b/test/fixtures/generation/types/EmptyStatement/expected.js new file mode 100644 index 0000000000..092bc2b041 --- /dev/null +++ b/test/fixtures/generation/types/EmptyStatement/expected.js @@ -0,0 +1 @@ +; diff --git a/test/fixtures/generation/types/ExportDeclaration-ExportSpecifier-ExportBatchSpecifier/actual.js b/test/fixtures/generation/types/ExportDeclaration-ExportSpecifier-ExportBatchSpecifier/actual.js new file mode 100644 index 0000000000..729d7ce58e --- /dev/null +++ b/test/fixtures/generation/types/ExportDeclaration-ExportSpecifier-ExportBatchSpecifier/actual.js @@ -0,0 +1,27 @@ +export default 42; +export default {}; +export default []; +export default foo; +export default function () {}; +export default class {}; +export default function foo() {}; +export default class Foo {}; +export * from "foo"; +export { foo } from "foo"; +export { foo, bar } from "foo"; +export { foo as bar } from "foo"; +export { foo as default } from "foo"; +export { foo as default, bar } from "foo"; +export { foo }; +export { foo, bar }; +export { foo as bar }; +export { foo as default }; +export { foo as default, bar }; +export var foo = 1; +export var foo2 = function () {}; +export var foo3; +export let foo4 = 2; +export let foo5; +export const foo6 = 3; +export function foo7() {} +export class foo8 {} diff --git a/test/fixtures/generation/types/ExportDeclaration-ExportSpecifier-ExportBatchSpecifier/expected.js b/test/fixtures/generation/types/ExportDeclaration-ExportSpecifier-ExportBatchSpecifier/expected.js new file mode 100644 index 0000000000..729d7ce58e --- /dev/null +++ b/test/fixtures/generation/types/ExportDeclaration-ExportSpecifier-ExportBatchSpecifier/expected.js @@ -0,0 +1,27 @@ +export default 42; +export default {}; +export default []; +export default foo; +export default function () {}; +export default class {}; +export default function foo() {}; +export default class Foo {}; +export * from "foo"; +export { foo } from "foo"; +export { foo, bar } from "foo"; +export { foo as bar } from "foo"; +export { foo as default } from "foo"; +export { foo as default, bar } from "foo"; +export { foo }; +export { foo, bar }; +export { foo as bar }; +export { foo as default }; +export { foo as default, bar }; +export var foo = 1; +export var foo2 = function () {}; +export var foo3; +export let foo4 = 2; +export let foo5; +export const foo6 = 3; +export function foo7() {} +export class foo8 {} diff --git a/test/fixtures/generation/types/ForInStatement/actual.js b/test/fixtures/generation/types/ForInStatement/actual.js new file mode 100644 index 0000000000..f767fe3b0f --- /dev/null +++ b/test/fixtures/generation/types/ForInStatement/actual.js @@ -0,0 +1,5 @@ +for (var i in nums) {} + +for (var i in nums) { + nums[i] = nums[i] * nums[i]; +} diff --git a/test/fixtures/generation/types/ForInStatement/expected.js b/test/fixtures/generation/types/ForInStatement/expected.js new file mode 100644 index 0000000000..f767fe3b0f --- /dev/null +++ b/test/fixtures/generation/types/ForInStatement/expected.js @@ -0,0 +1,5 @@ +for (var i in nums) {} + +for (var i in nums) { + nums[i] = nums[i] * nums[i]; +} diff --git a/test/fixtures/generation/types/ForOfStatement/actual.js b/test/fixtures/generation/types/ForOfStatement/actual.js new file mode 100644 index 0000000000..190da9ebfa --- /dev/null +++ b/test/fixtures/generation/types/ForOfStatement/actual.js @@ -0,0 +1,5 @@ +for (var x of nums) {} + +for (var x of nums) { + console.log(x * x); +} diff --git a/test/fixtures/generation/types/ForOfStatement/expected.js b/test/fixtures/generation/types/ForOfStatement/expected.js new file mode 100644 index 0000000000..190da9ebfa --- /dev/null +++ b/test/fixtures/generation/types/ForOfStatement/expected.js @@ -0,0 +1,5 @@ +for (var x of nums) {} + +for (var x of nums) { + console.log(x * x); +} diff --git a/test/fixtures/generation/types/ForStatement/actual.js b/test/fixtures/generation/types/ForStatement/actual.js new file mode 100644 index 0000000000..1f82486abe --- /dev/null +++ b/test/fixtures/generation/types/ForStatement/actual.js @@ -0,0 +1,3 @@ +for (var i = 0;;) {} +for (var i = 0; i < 5;) {} +for (var i = 0; i < 5; i++) {} diff --git a/test/fixtures/generation/types/ForStatement/expected.js b/test/fixtures/generation/types/ForStatement/expected.js new file mode 100644 index 0000000000..1f82486abe --- /dev/null +++ b/test/fixtures/generation/types/ForStatement/expected.js @@ -0,0 +1,3 @@ +for (var i = 0;;) {} +for (var i = 0; i < 5;) {} +for (var i = 0; i < 5; i++) {} diff --git a/test/fixtures/generation/types/FunctionDeclaration-FunctionExpression/actual.js b/test/fixtures/generation/types/FunctionDeclaration-FunctionExpression/actual.js new file mode 100644 index 0000000000..3b31e93eb7 --- /dev/null +++ b/test/fixtures/generation/types/FunctionDeclaration-FunctionExpression/actual.js @@ -0,0 +1,23 @@ +function foo(bar = "bar") {} + +function foo(bar = "bar", ...items) {} + +function foo(...items) {} + +function* foo() {} + +function foo() {} + +async function foo() {} + +var foo = function* foo() {}; + +var foo = function foo() {}; + +var foo = async function foo() {}; + +var foo = function* () {}; + +var foo = function () {}; + +var foo = async function () {}; diff --git a/test/fixtures/generation/types/FunctionDeclaration-FunctionExpression/expected.js b/test/fixtures/generation/types/FunctionDeclaration-FunctionExpression/expected.js new file mode 100644 index 0000000000..3b31e93eb7 --- /dev/null +++ b/test/fixtures/generation/types/FunctionDeclaration-FunctionExpression/expected.js @@ -0,0 +1,23 @@ +function foo(bar = "bar") {} + +function foo(bar = "bar", ...items) {} + +function foo(...items) {} + +function* foo() {} + +function foo() {} + +async function foo() {} + +var foo = function* foo() {}; + +var foo = function foo() {}; + +var foo = async function foo() {}; + +var foo = function* () {}; + +var foo = function () {}; + +var foo = async function () {}; diff --git a/test/fixtures/generation/types/Identifier/actual.js b/test/fixtures/generation/types/Identifier/actual.js new file mode 100644 index 0000000000..ef20d940c5 --- /dev/null +++ b/test/fixtures/generation/types/Identifier/actual.js @@ -0,0 +1,2 @@ +foo; +undefined; diff --git a/test/fixtures/generation/types/Identifier/expected.js b/test/fixtures/generation/types/Identifier/expected.js new file mode 100644 index 0000000000..ef20d940c5 --- /dev/null +++ b/test/fixtures/generation/types/Identifier/expected.js @@ -0,0 +1,2 @@ +foo; +undefined; diff --git a/test/fixtures/generation/types/IfStatement/actual.js b/test/fixtures/generation/types/IfStatement/actual.js new file mode 100644 index 0000000000..4631d3503f --- /dev/null +++ b/test/fixtures/generation/types/IfStatement/actual.js @@ -0,0 +1,25 @@ +if (foo) foobar(); + +if (foo) { + foobar(); +} + +if (foo) {} + +if (foo) { + foo(); +} else bar(); + +if (foo) { + foo(); +} else { + bar(); +} + +if (foo) { + foo(); +} else if (bar) { + foobar(); +} else { + bar(); +} diff --git a/test/fixtures/generation/types/IfStatement/expected.js b/test/fixtures/generation/types/IfStatement/expected.js new file mode 100644 index 0000000000..4631d3503f --- /dev/null +++ b/test/fixtures/generation/types/IfStatement/expected.js @@ -0,0 +1,25 @@ +if (foo) foobar(); + +if (foo) { + foobar(); +} + +if (foo) {} + +if (foo) { + foo(); +} else bar(); + +if (foo) { + foo(); +} else { + bar(); +} + +if (foo) { + foo(); +} else if (bar) { + foobar(); +} else { + bar(); +} diff --git a/test/fixtures/generation/types/ImportDeclaration-ImportSpecifier-ImportBatchSpecifier/actual.js b/test/fixtures/generation/types/ImportDeclaration-ImportSpecifier-ImportBatchSpecifier/actual.js new file mode 100644 index 0000000000..b7a4a4b9fd --- /dev/null +++ b/test/fixtures/generation/types/ImportDeclaration-ImportSpecifier-ImportBatchSpecifier/actual.js @@ -0,0 +1,9 @@ +import "foo"; +import foo from "foo"; +import { default as foo } from "foo"; +import * as foo from "foo"; +import foo, { baz as xyz } from "foo"; +import { bar } from "foo"; +import { bar, baz } from "foo"; +import { bar as baz } from "foo"; +import { bar as baz, xyz } from "foo"; diff --git a/test/fixtures/generation/types/ImportDeclaration-ImportSpecifier-ImportBatchSpecifier/expected.js b/test/fixtures/generation/types/ImportDeclaration-ImportSpecifier-ImportBatchSpecifier/expected.js new file mode 100644 index 0000000000..b7a4a4b9fd --- /dev/null +++ b/test/fixtures/generation/types/ImportDeclaration-ImportSpecifier-ImportBatchSpecifier/expected.js @@ -0,0 +1,9 @@ +import "foo"; +import foo from "foo"; +import { default as foo } from "foo"; +import * as foo from "foo"; +import foo, { baz as xyz } from "foo"; +import { bar } from "foo"; +import { bar, baz } from "foo"; +import { bar as baz } from "foo"; +import { bar as baz, xyz } from "foo"; diff --git a/test/fixtures/generation/types/LabeledStatement/actual.js b/test/fixtures/generation/types/LabeledStatement/actual.js new file mode 100644 index 0000000000..2846749406 --- /dev/null +++ b/test/fixtures/generation/types/LabeledStatement/actual.js @@ -0,0 +1 @@ +label: for (var i in test) {} diff --git a/test/fixtures/generation/types/LabeledStatement/expected.js b/test/fixtures/generation/types/LabeledStatement/expected.js new file mode 100644 index 0000000000..2846749406 --- /dev/null +++ b/test/fixtures/generation/types/LabeledStatement/expected.js @@ -0,0 +1 @@ +label: for (var i in test) {} diff --git a/test/fixtures/generation/types/Literal/actual.js b/test/fixtures/generation/types/Literal/actual.js new file mode 100644 index 0000000000..936cce21e5 --- /dev/null +++ b/test/fixtures/generation/types/Literal/actual.js @@ -0,0 +1,6 @@ +5; +"foobar"; +/foobar/g; +null; +true; +false; diff --git a/test/fixtures/generation/types/Literal/expected.js b/test/fixtures/generation/types/Literal/expected.js new file mode 100644 index 0000000000..936cce21e5 --- /dev/null +++ b/test/fixtures/generation/types/Literal/expected.js @@ -0,0 +1,6 @@ +5; +"foobar"; +/foobar/g; +null; +true; +false; diff --git a/test/fixtures/generation/types/MemberExpression/actual.js b/test/fixtures/generation/types/MemberExpression/actual.js new file mode 100644 index 0000000000..6dd85f4b19 --- /dev/null +++ b/test/fixtures/generation/types/MemberExpression/actual.js @@ -0,0 +1,8 @@ +foo["bar"]; +foo.bar; + +foo.bar.foo; +foo.bar["foo"]; + +foo["foo"]["bar"]; +foo[test()][bar()]; diff --git a/test/fixtures/generation/types/MemberExpression/expected.js b/test/fixtures/generation/types/MemberExpression/expected.js new file mode 100644 index 0000000000..6dd85f4b19 --- /dev/null +++ b/test/fixtures/generation/types/MemberExpression/expected.js @@ -0,0 +1,8 @@ +foo["bar"]; +foo.bar; + +foo.bar.foo; +foo.bar["foo"]; + +foo["foo"]["bar"]; +foo[test()][bar()]; diff --git a/test/fixtures/generation/types/NewExpression/actual.js b/test/fixtures/generation/types/NewExpression/actual.js new file mode 100644 index 0000000000..2e4ccdb39d --- /dev/null +++ b/test/fixtures/generation/types/NewExpression/actual.js @@ -0,0 +1,3 @@ +new Foo; +new Foo(); +new Foo(bar); diff --git a/test/fixtures/generation/types/NewExpression/expected.js b/test/fixtures/generation/types/NewExpression/expected.js new file mode 100644 index 0000000000..962d55bf72 --- /dev/null +++ b/test/fixtures/generation/types/NewExpression/expected.js @@ -0,0 +1,3 @@ +new Foo(); +new Foo(); +new Foo(bar); diff --git a/test/fixtures/generation/types/ObjectExpression-ObjectPattern-Property/actual.js b/test/fixtures/generation/types/ObjectExpression-ObjectPattern-Property/actual.js new file mode 100644 index 0000000000..fc72e3dd42 --- /dev/null +++ b/test/fixtures/generation/types/ObjectExpression-ObjectPattern-Property/actual.js @@ -0,0 +1,20 @@ +var foo = {}; + +var foo = { x, y }; + +var foo = { x: x, y: y }; + +var foo = { + x: x, + y: y +}; + +var foo = { + ["bar"]: "foo", + ["foo"]() {}, + foo() {}, + async foo() {}, + *foo() {}, + get foo() {}, + set foo() {} +}; diff --git a/test/fixtures/generation/types/ObjectExpression-ObjectPattern-Property/expected.js b/test/fixtures/generation/types/ObjectExpression-ObjectPattern-Property/expected.js new file mode 100644 index 0000000000..fc72e3dd42 --- /dev/null +++ b/test/fixtures/generation/types/ObjectExpression-ObjectPattern-Property/expected.js @@ -0,0 +1,20 @@ +var foo = {}; + +var foo = { x, y }; + +var foo = { x: x, y: y }; + +var foo = { + x: x, + y: y +}; + +var foo = { + ["bar"]: "foo", + ["foo"]() {}, + foo() {}, + async foo() {}, + *foo() {}, + get foo() {}, + set foo() {} +}; diff --git a/test/fixtures/generation/types/ParenthesizedExpression/actual.js b/test/fixtures/generation/types/ParenthesizedExpression/actual.js new file mode 100644 index 0000000000..5d7b0fd7c0 --- /dev/null +++ b/test/fixtures/generation/types/ParenthesizedExpression/actual.js @@ -0,0 +1,2 @@ +(foo()); +(5 * 6); diff --git a/test/fixtures/generation/types/ParenthesizedExpression/expected.js b/test/fixtures/generation/types/ParenthesizedExpression/expected.js new file mode 100644 index 0000000000..5d7b0fd7c0 --- /dev/null +++ b/test/fixtures/generation/types/ParenthesizedExpression/expected.js @@ -0,0 +1,2 @@ +(foo()); +(5 * 6); diff --git a/test/fixtures/generation/types/ReturnStatement/actual.js b/test/fixtures/generation/types/ReturnStatement/actual.js new file mode 100644 index 0000000000..404a7c2e64 --- /dev/null +++ b/test/fixtures/generation/types/ReturnStatement/actual.js @@ -0,0 +1,7 @@ +function foo() { + return; +} + +function bar() { + return "foo"; +} diff --git a/test/fixtures/generation/types/ReturnStatement/expected.js b/test/fixtures/generation/types/ReturnStatement/expected.js new file mode 100644 index 0000000000..404a7c2e64 --- /dev/null +++ b/test/fixtures/generation/types/ReturnStatement/expected.js @@ -0,0 +1,7 @@ +function foo() { + return; +} + +function bar() { + return "foo"; +} diff --git a/test/fixtures/generation/types/SequenceExpression/actual.js b/test/fixtures/generation/types/SequenceExpression/actual.js new file mode 100644 index 0000000000..df1a8bc422 --- /dev/null +++ b/test/fixtures/generation/types/SequenceExpression/actual.js @@ -0,0 +1,4 @@ +foo, bar; + +foo, +bar; diff --git a/test/fixtures/generation/types/SequenceExpression/expected.js b/test/fixtures/generation/types/SequenceExpression/expected.js new file mode 100644 index 0000000000..df1a8bc422 --- /dev/null +++ b/test/fixtures/generation/types/SequenceExpression/expected.js @@ -0,0 +1,4 @@ +foo, bar; + +foo, +bar; diff --git a/test/fixtures/generation/types/SpreadElement/actual.js b/test/fixtures/generation/types/SpreadElement/actual.js new file mode 100644 index 0000000000..7a9e438858 --- /dev/null +++ b/test/fixtures/generation/types/SpreadElement/actual.js @@ -0,0 +1,3 @@ +[...foo]; +foo(bar, ...items); +new Foo(...foo); diff --git a/test/fixtures/generation/types/SpreadElement/expected.js b/test/fixtures/generation/types/SpreadElement/expected.js new file mode 100644 index 0000000000..7a9e438858 --- /dev/null +++ b/test/fixtures/generation/types/SpreadElement/expected.js @@ -0,0 +1,3 @@ +[...foo]; +foo(bar, ...items); +new Foo(...foo); diff --git a/test/fixtures/generation/types/SwitchStatement-SwitchCase/actual.js b/test/fixtures/generation/types/SwitchStatement-SwitchCase/actual.js new file mode 100644 index 0000000000..dbfef765fe --- /dev/null +++ b/test/fixtures/generation/types/SwitchStatement-SwitchCase/actual.js @@ -0,0 +1,39 @@ +switch (foo) {} + +switch (foo) { + case "foo": +} + +switch (foo) { + default: +} + +switch (foo) { + case "foo": + default: +} + +switch (foo) { + case "foo": + case "bar": + default: +} + +switch (foo) { + case "foo": + foo(); + break; + + case "bar": + bar(); + break; + + default: + yay(); +} + +switch (foo) { + case "foo": foo(); + case "bar": bar(); + default: yay(); +} diff --git a/test/fixtures/generation/types/SwitchStatement-SwitchCase/expected.js b/test/fixtures/generation/types/SwitchStatement-SwitchCase/expected.js new file mode 100644 index 0000000000..dbfef765fe --- /dev/null +++ b/test/fixtures/generation/types/SwitchStatement-SwitchCase/expected.js @@ -0,0 +1,39 @@ +switch (foo) {} + +switch (foo) { + case "foo": +} + +switch (foo) { + default: +} + +switch (foo) { + case "foo": + default: +} + +switch (foo) { + case "foo": + case "bar": + default: +} + +switch (foo) { + case "foo": + foo(); + break; + + case "bar": + bar(); + break; + + default: + yay(); +} + +switch (foo) { + case "foo": foo(); + case "bar": bar(); + default: yay(); +} diff --git a/test/fixtures/generation/types/TemplateLiteral-TaggedTemplateExpression-TemplateElement/actual.js b/test/fixtures/generation/types/TemplateLiteral-TaggedTemplateExpression-TemplateElement/actual.js new file mode 100644 index 0000000000..455ed642b5 --- /dev/null +++ b/test/fixtures/generation/types/TemplateLiteral-TaggedTemplateExpression-TemplateElement/actual.js @@ -0,0 +1,12 @@ +html``; + +`multi + lines`; + +`test ${ interpolation } test`; + +`foob + + asdf +awer + erqer`; diff --git a/test/fixtures/generation/types/TemplateLiteral-TaggedTemplateExpression-TemplateElement/expected.js b/test/fixtures/generation/types/TemplateLiteral-TaggedTemplateExpression-TemplateElement/expected.js new file mode 100644 index 0000000000..455ed642b5 --- /dev/null +++ b/test/fixtures/generation/types/TemplateLiteral-TaggedTemplateExpression-TemplateElement/expected.js @@ -0,0 +1,12 @@ +html``; + +`multi + lines`; + +`test ${ interpolation } test`; + +`foob + + asdf +awer + erqer`; diff --git a/test/fixtures/generation/types/ThisExpression/actual.js b/test/fixtures/generation/types/ThisExpression/actual.js new file mode 100644 index 0000000000..0ce825c42a --- /dev/null +++ b/test/fixtures/generation/types/ThisExpression/actual.js @@ -0,0 +1,5 @@ +this; +this.foo; +this["foo"]; +this.foo(); +this["foo"](); diff --git a/test/fixtures/generation/types/ThisExpression/expected.js b/test/fixtures/generation/types/ThisExpression/expected.js new file mode 100644 index 0000000000..0ce825c42a --- /dev/null +++ b/test/fixtures/generation/types/ThisExpression/expected.js @@ -0,0 +1,5 @@ +this; +this.foo; +this["foo"]; +this.foo(); +this["foo"](); diff --git a/test/fixtures/generation/types/ThrowStatement/actual.js b/test/fixtures/generation/types/ThrowStatement/actual.js new file mode 100644 index 0000000000..15dd4fc7b2 --- /dev/null +++ b/test/fixtures/generation/types/ThrowStatement/actual.js @@ -0,0 +1,3 @@ +throw err; +throw Error("foobar"); +throw new Error("foobar"); diff --git a/test/fixtures/generation/types/ThrowStatement/expected.js b/test/fixtures/generation/types/ThrowStatement/expected.js new file mode 100644 index 0000000000..15dd4fc7b2 --- /dev/null +++ b/test/fixtures/generation/types/ThrowStatement/expected.js @@ -0,0 +1,3 @@ +throw err; +throw Error("foobar"); +throw new Error("foobar"); diff --git a/test/fixtures/generation/types/TryStatement-CatchClause/actual.js b/test/fixtures/generation/types/TryStatement-CatchClause/actual.js new file mode 100644 index 0000000000..95717a83b6 --- /dev/null +++ b/test/fixtures/generation/types/TryStatement-CatchClause/actual.js @@ -0,0 +1,25 @@ +try {} catch (err) {} + +try { + bar; +} catch (err) {} + +try { + bar; +} catch (err) { + foo(); +} + +try { + bar; +} catch (err) { + foo(); +} finally { + yay(); +} + +try { + bar; +} catch (err) { + foo(); +} finally {} diff --git a/test/fixtures/generation/types/TryStatement-CatchClause/expected.js b/test/fixtures/generation/types/TryStatement-CatchClause/expected.js new file mode 100644 index 0000000000..95717a83b6 --- /dev/null +++ b/test/fixtures/generation/types/TryStatement-CatchClause/expected.js @@ -0,0 +1,25 @@ +try {} catch (err) {} + +try { + bar; +} catch (err) {} + +try { + bar; +} catch (err) { + foo(); +} + +try { + bar; +} catch (err) { + foo(); +} finally { + yay(); +} + +try { + bar; +} catch (err) { + foo(); +} finally {} diff --git a/test/fixtures/generation/types/UnaryExpression/actual.js b/test/fixtures/generation/types/UnaryExpression/actual.js new file mode 100644 index 0000000000..9f318cdb1f --- /dev/null +++ b/test/fixtures/generation/types/UnaryExpression/actual.js @@ -0,0 +1,5 @@ +delete delete i; ++ +i; +!!i; ++ ++i; +- --i; diff --git a/test/fixtures/generation/types/UnaryExpression/expected.js b/test/fixtures/generation/types/UnaryExpression/expected.js new file mode 100644 index 0000000000..9f318cdb1f --- /dev/null +++ b/test/fixtures/generation/types/UnaryExpression/expected.js @@ -0,0 +1,5 @@ +delete delete i; ++ +i; +!!i; ++ ++i; +- --i; diff --git a/test/fixtures/generation/types/UpdateExpression/actual.js b/test/fixtures/generation/types/UpdateExpression/actual.js new file mode 100644 index 0000000000..b074c6b4a1 --- /dev/null +++ b/test/fixtures/generation/types/UpdateExpression/actual.js @@ -0,0 +1,2 @@ +++i; +i++; diff --git a/test/fixtures/generation/types/UpdateExpression/expected.js b/test/fixtures/generation/types/UpdateExpression/expected.js new file mode 100644 index 0000000000..b074c6b4a1 --- /dev/null +++ b/test/fixtures/generation/types/UpdateExpression/expected.js @@ -0,0 +1,2 @@ +++i; +i++; diff --git a/test/fixtures/generation/types/VariableDeclaration-VariableDeclarator/actual.js b/test/fixtures/generation/types/VariableDeclaration-VariableDeclarator/actual.js new file mode 100644 index 0000000000..ede42c53ec --- /dev/null +++ b/test/fixtures/generation/types/VariableDeclaration-VariableDeclarator/actual.js @@ -0,0 +1,13 @@ +let foo; +var foo; + +let foo = "foo"; +var foo = "bar"; +const foo = "foo"; + +let foo, bar = "bar"; +var foo, bar = "bar"; + +let foo = "foo", bar = "bar"; +var foo = "foo", bar = "bar"; +const foo = "foo", bar = "bar"; diff --git a/test/fixtures/generation/types/VariableDeclaration-VariableDeclarator/expected.js b/test/fixtures/generation/types/VariableDeclaration-VariableDeclarator/expected.js new file mode 100644 index 0000000000..ede42c53ec --- /dev/null +++ b/test/fixtures/generation/types/VariableDeclaration-VariableDeclarator/expected.js @@ -0,0 +1,13 @@ +let foo; +var foo; + +let foo = "foo"; +var foo = "bar"; +const foo = "foo"; + +let foo, bar = "bar"; +var foo, bar = "bar"; + +let foo = "foo", bar = "bar"; +var foo = "foo", bar = "bar"; +const foo = "foo", bar = "bar"; diff --git a/test/fixtures/generation/types/WhileStatement/actual.js b/test/fixtures/generation/types/WhileStatement/actual.js new file mode 100644 index 0000000000..616c1dcd45 --- /dev/null +++ b/test/fixtures/generation/types/WhileStatement/actual.js @@ -0,0 +1,5 @@ +while (foo) {} + +while (foo) { + bar(); +} diff --git a/test/fixtures/generation/types/WhileStatement/expected.js b/test/fixtures/generation/types/WhileStatement/expected.js new file mode 100644 index 0000000000..616c1dcd45 --- /dev/null +++ b/test/fixtures/generation/types/WhileStatement/expected.js @@ -0,0 +1,5 @@ +while (foo) {} + +while (foo) { + bar(); +} diff --git a/test/fixtures/generation/types/WithStatement/actual.js b/test/fixtures/generation/types/WithStatement/actual.js new file mode 100644 index 0000000000..eb30b5f541 --- /dev/null +++ b/test/fixtures/generation/types/WithStatement/actual.js @@ -0,0 +1,5 @@ +with (foo) {} + +with (foo) { + bar(); +} diff --git a/test/fixtures/generation/types/WithStatement/expected.js b/test/fixtures/generation/types/WithStatement/expected.js new file mode 100644 index 0000000000..eb30b5f541 --- /dev/null +++ b/test/fixtures/generation/types/WithStatement/expected.js @@ -0,0 +1,5 @@ +with (foo) {} + +with (foo) { + bar(); +} diff --git a/test/fixtures/generation/types/XJSAttribute/actual.js b/test/fixtures/generation/types/XJSAttribute/actual.js new file mode 100644 index 0000000000..ff8711dc2f --- /dev/null +++ b/test/fixtures/generation/types/XJSAttribute/actual.js @@ -0,0 +1,7 @@ +
; + +
text
; + +
; + +
text
; diff --git a/test/fixtures/generation/types/XJSAttribute/expected.js b/test/fixtures/generation/types/XJSAttribute/expected.js new file mode 100644 index 0000000000..ff8711dc2f --- /dev/null +++ b/test/fixtures/generation/types/XJSAttribute/expected.js @@ -0,0 +1,7 @@ +
; + +
text
; + +
; + +
text
; diff --git a/test/fixtures/generation/types/XJSElement-XJSOpeningElement-XJSClosingElement-XJSIdentifier/actual.js b/test/fixtures/generation/types/XJSElement-XJSOpeningElement-XJSClosingElement-XJSIdentifier/actual.js new file mode 100644 index 0000000000..4ef54fa621 --- /dev/null +++ b/test/fixtures/generation/types/XJSElement-XJSOpeningElement-XJSClosingElement-XJSIdentifier/actual.js @@ -0,0 +1,5 @@ +
; + +
; + +
text
; diff --git a/test/fixtures/generation/types/XJSElement-XJSOpeningElement-XJSClosingElement-XJSIdentifier/expected.js b/test/fixtures/generation/types/XJSElement-XJSOpeningElement-XJSClosingElement-XJSIdentifier/expected.js new file mode 100644 index 0000000000..4ef54fa621 --- /dev/null +++ b/test/fixtures/generation/types/XJSElement-XJSOpeningElement-XJSClosingElement-XJSIdentifier/expected.js @@ -0,0 +1,5 @@ +
; + +
; + +
text
; diff --git a/test/fixtures/generation/types/XJSEmptyExpression/actual.js b/test/fixtures/generation/types/XJSEmptyExpression/actual.js new file mode 100644 index 0000000000..a7a4a7e533 --- /dev/null +++ b/test/fixtures/generation/types/XJSEmptyExpression/actual.js @@ -0,0 +1 @@ +{}; diff --git a/test/fixtures/generation/types/XJSEmptyExpression/expected.js b/test/fixtures/generation/types/XJSEmptyExpression/expected.js new file mode 100644 index 0000000000..a7a4a7e533 --- /dev/null +++ b/test/fixtures/generation/types/XJSEmptyExpression/expected.js @@ -0,0 +1 @@ +{}; diff --git a/test/fixtures/generation/types/XJSExpressionContainer/actual.js b/test/fixtures/generation/types/XJSExpressionContainer/actual.js new file mode 100644 index 0000000000..b7c8a18a62 --- /dev/null +++ b/test/fixtures/generation/types/XJSExpressionContainer/actual.js @@ -0,0 +1 @@ +
{this.props.children}
; diff --git a/test/fixtures/generation/types/XJSExpressionContainer/expected.js b/test/fixtures/generation/types/XJSExpressionContainer/expected.js new file mode 100644 index 0000000000..b7c8a18a62 --- /dev/null +++ b/test/fixtures/generation/types/XJSExpressionContainer/expected.js @@ -0,0 +1 @@ +
{this.props.children}
; diff --git a/test/fixtures/generation/types/XJSMemberExpression/actual.js b/test/fixtures/generation/types/XJSMemberExpression/actual.js new file mode 100644 index 0000000000..875ffe4f32 --- /dev/null +++ b/test/fixtures/generation/types/XJSMemberExpression/actual.js @@ -0,0 +1 @@ +; diff --git a/test/fixtures/generation/types/XJSMemberExpression/expected.js b/test/fixtures/generation/types/XJSMemberExpression/expected.js new file mode 100644 index 0000000000..875ffe4f32 --- /dev/null +++ b/test/fixtures/generation/types/XJSMemberExpression/expected.js @@ -0,0 +1 @@ +; diff --git a/test/fixtures/generation/types/XJSNamespacedName/actual.js b/test/fixtures/generation/types/XJSNamespacedName/actual.js new file mode 100644 index 0000000000..33efe268cf --- /dev/null +++ b/test/fixtures/generation/types/XJSNamespacedName/actual.js @@ -0,0 +1 @@ +; diff --git a/test/fixtures/generation/types/XJSNamespacedName/expected.js b/test/fixtures/generation/types/XJSNamespacedName/expected.js new file mode 100644 index 0000000000..33efe268cf --- /dev/null +++ b/test/fixtures/generation/types/XJSNamespacedName/expected.js @@ -0,0 +1 @@ +; diff --git a/test/fixtures/generation/types/XJSSpreadAttribute/actual.js b/test/fixtures/generation/types/XJSSpreadAttribute/actual.js new file mode 100644 index 0000000000..82aa5eb72d --- /dev/null +++ b/test/fixtures/generation/types/XJSSpreadAttribute/actual.js @@ -0,0 +1 @@ +; diff --git a/test/fixtures/generation/types/XJSSpreadAttribute/expected.js b/test/fixtures/generation/types/XJSSpreadAttribute/expected.js new file mode 100644 index 0000000000..82aa5eb72d --- /dev/null +++ b/test/fixtures/generation/types/XJSSpreadAttribute/expected.js @@ -0,0 +1 @@ +; diff --git a/test/fixtures/generation/types/YieldExpression/actual.js b/test/fixtures/generation/types/YieldExpression/actual.js new file mode 100644 index 0000000000..b37159854f --- /dev/null +++ b/test/fixtures/generation/types/YieldExpression/actual.js @@ -0,0 +1,7 @@ +function* foo() { + yield bar; +} + +function* bar() { + yield* foo(); +} diff --git a/test/fixtures/generation/types/YieldExpression/expected.js b/test/fixtures/generation/types/YieldExpression/expected.js new file mode 100644 index 0000000000..b37159854f --- /dev/null +++ b/test/fixtures/generation/types/YieldExpression/expected.js @@ -0,0 +1,7 @@ +function* foo() { + yield bar; +} + +function* bar() { + yield* foo(); +}