From 5a7dffe42775892cb2171ea1a2bbd9c3ea8977f4 Mon Sep 17 00:00:00 2001 From: Nick Stott Date: Mon, 21 Oct 2019 11:58:45 -0400 Subject: Reenable std tests that were disabled during merge (#3159) --- std/prettier/main_test.ts | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) (limited to 'std/prettier') diff --git a/std/prettier/main_test.ts b/std/prettier/main_test.ts index 5214db8ef..16c19ed03 100644 --- a/std/prettier/main_test.ts +++ b/std/prettier/main_test.ts @@ -213,7 +213,6 @@ console.log([function foo() {}, function baz() {}, (a) => {}]); emptyDir(tempDir); }); -/* TODO(ry) Re-enable test test(async function testPrettierPrintToStdout(): Promise { const tempDir = await Deno.makeTempDir(); await copy(testdata, tempDir, { overwrite: true }); @@ -226,20 +225,35 @@ test(async function testPrettierPrintToStdout(): Promise { const { stdout } = await run([...cmd, file0]); // The source file will not change without `--write` flags. - assertEquals(await getSourceCode(file0), "console.log (0)" + EOL); + assertEquals( + await getSourceCode(file0), + `console.log (0) +` + ); // The output should be formatted code. - assertEquals(stdout, "console.log(0);" + EOL); + assertEquals( + stdout, + `console.log(0); +` + ); const { stdout: formattedCode } = await run([...cmd, file1]); // The source file will not change without `--write` flags. - assertEquals(await getSourceCode(file1), "console.log(0);" + EOL); + assertEquals( + await getSourceCode(file1), + `console.log(0); +` + ); // The output will be formatted code even it is the same as the source file's // content. - assertEquals(formattedCode, "console.log(0);" + EOL); + assertEquals( + formattedCode, + `console.log(0); +` + ); emptyDir(tempDir); }); -*/ test(async function testPrettierReadFromStdin(): Promise { interface TestCase { -- cgit v1.2.3