diff --git a/test/core/fixtures/generation/comments/comment-statement-with-retainlines-option/actual.js b/test/core/fixtures/generation/comments/comment-statement-with-retainlines-option/actual.js new file mode 100644 index 0000000000..9aecc7f326 --- /dev/null +++ b/test/core/fixtures/generation/comments/comment-statement-with-retainlines-option/actual.js @@ -0,0 +1,2 @@ +// comment +print("hello"); diff --git a/test/core/fixtures/generation/comments/comment-statement-with-retainlines-option/expected.js b/test/core/fixtures/generation/comments/comment-statement-with-retainlines-option/expected.js new file mode 100644 index 0000000000..9aecc7f326 --- /dev/null +++ b/test/core/fixtures/generation/comments/comment-statement-with-retainlines-option/expected.js @@ -0,0 +1,2 @@ +// comment +print("hello"); diff --git a/test/core/fixtures/generation/comments/comment-statement-with-retainlines-option/options.json b/test/core/fixtures/generation/comments/comment-statement-with-retainlines-option/options.json new file mode 100644 index 0000000000..97925bbcb6 --- /dev/null +++ b/test/core/fixtures/generation/comments/comment-statement-with-retainlines-option/options.json @@ -0,0 +1,3 @@ +{ + "retainLines": true +} diff --git a/test/core/generation.js b/test/core/generation.js index 66990a7895..21bd55094f 100644 --- a/test/core/generation.js +++ b/test/core/generation.js @@ -37,7 +37,7 @@ _.each(helper.get("generation"), function (testSuite) { "es7.exportExtensions": true } }, actual.code); - var actualCode = generate(actualAst, null, actual.code).code; + var actualCode = generate(actualAst, task.options, actual.code).code; chai.expect(actualCode).to.equal(expect.code, actual.loc + " !== " + expect.loc); });