diff options
author | Yusuke Sakurai <kerokerokerop@gmail.com> | 2019-10-13 04:55:05 +0900 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2019-10-12 12:55:05 -0700 |
commit | 5f5583cf19349d19f717f65312558588825ad7b8 (patch) | |
tree | c27a00e8405a68d9800f4f021dcb531a6fd30ad6 /std/prettier/main_test.ts | |
parent | 4b7204babe4716af107786f8794072b9496d2daf (diff) |
fix: [prettier] deno fmt should format jsx/tsx files (#3118)
Diffstat (limited to 'std/prettier/main_test.ts')
-rw-r--r-- | std/prettier/main_test.ts | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/std/prettier/main_test.ts b/std/prettier/main_test.ts index 56d031b64..65a963c02 100644 --- a/std/prettier/main_test.ts +++ b/std/prettier/main_test.ts @@ -26,8 +26,9 @@ const cmd = [ "--allow-run", "--allow-write", "--allow-read", - "prettier/main.ts" + "./prettier/main.ts" ]; + const testdata = join("prettier", "testdata"); function normalizeOutput(output: string): string { @@ -51,7 +52,9 @@ test(async function testPrettierCheckAndFormatFiles(): Promise<void> { const files = [ join(tempDir, "0.ts"), join(tempDir, "1.js"), - join(tempDir, "2.ts") + join(tempDir, "2.ts"), + join(tempDir, "3.jsx"), + join(tempDir, "4.tsx") ]; let p = await run([...cmd, "--check", ...files]); @@ -63,7 +66,10 @@ test(async function testPrettierCheckAndFormatFiles(): Promise<void> { assertEquals( normalizeOutput(p.stdout), normalizeOutput(`Formatting ${tempDir}/0.ts -Formatting ${tempDir}/1.js`) +Formatting ${tempDir}/1.js +Formatting ${tempDir}/3.jsx +Formatting ${tempDir}/4.tsx +`) ); p = await run([...cmd, "--check", ...files]); |