diff options
author | 2021-06-22 09:06:30 -0500 | |
---|---|---|
committer | 2021-06-22 10:06:30 -0400 | |
commit | 90929fbfcad13efaa8c7c9e26f7f9d097fcb5c27 (patch) | |
tree | 2c7bb96e99c2df3eea43bd34b0488d54de9fd664 | |
parent | b0e41eaf518a6fa0e642535755facf91c444849b (diff) | |
download | astro-90929fbfcad13efaa8c7c9e26f7f9d097fcb5c27.tar.gz astro-90929fbfcad13efaa8c7c9e26f7f9d097fcb5c27.tar.zst astro-90929fbfcad13efaa8c7c9e26f7f9d097fcb5c27.zip |
Use `assert.fixture` rather than `assert.equal` for the prettier formatting diffs for easier to read errors (#509)
-rw-r--r-- | tools/prettier-plugin-astro/test/astro-prettier.test.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/prettier-plugin-astro/test/astro-prettier.test.js b/tools/prettier-plugin-astro/test/astro-prettier.test.js index fbc847228..19ce12a22 100644 --- a/tools/prettier-plugin-astro/test/astro-prettier.test.js +++ b/tools/prettier-plugin-astro/test/astro-prettier.test.js @@ -19,26 +19,26 @@ const getFiles = async (name) => { Prettier('can format a basic Astro file', async () => { const [src, out] = await getFiles('basic'); - assert.not.equal(src, out); + assert.not.fixture(src, out); const formatted = format(src); - assert.equal(formatted, out); + assert.fixture(formatted, out); }); Prettier('can format an Astro file with frontmatter', async () => { const [src, out] = await getFiles('frontmatter'); - assert.not.equal(src, out); + assert.not.fixture(src, out); const formatted = format(src); - assert.equal(formatted, out); + assert.fixture(formatted, out); }); Prettier('can format an Astro file with embedded JSX expressions', async () => { const [src, out] = await getFiles('embedded-expr'); - assert.not.equal(src, out); + assert.not.fixture(src, out); const formatted = format(src); - assert.equal(formatted, out); + assert.fixture(formatted, out); }); Prettier.run(); |