summaryrefslogtreecommitdiff
path: root/std/prettier/main_test.ts
diff options
context:
space:
mode:
authorNick Stott <nick@nickstott.com>2019-10-21 11:58:45 -0400
committerRy Dahl <ry@tinyclouds.org>2019-10-21 11:58:45 -0400
commit5a7dffe42775892cb2171ea1a2bbd9c3ea8977f4 (patch)
tree7466cef7692dfa72ae7059c3148208026dcf444d /std/prettier/main_test.ts
parent2b2868b8a77bb545238ce19e039e2018578fb5ad (diff)
Reenable std tests that were disabled during merge (#3159)
Diffstat (limited to 'std/prettier/main_test.ts')
-rw-r--r--std/prettier/main_test.ts26
1 files changed, 20 insertions, 6 deletions
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<void> {
const tempDir = await Deno.makeTempDir();
await copy(testdata, tempDir, { overwrite: true });
@@ -226,20 +225,35 @@ test(async function testPrettierPrintToStdout(): Promise<void> {
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<void> {
interface TestCase {