mirror of
https://github.com/withastro/astro.git
synced 2025-02-03 22:29:08 -05:00
Use assert.fixture
rather than assert.equal
for the prettier formatting diffs for easier to read errors (#509)
This commit is contained in:
parent
b0e41eaf51
commit
90929fbfca
1 changed files with 6 additions and 6 deletions
|
@ -19,26 +19,26 @@ const getFiles = async (name) => {
|
||||||
|
|
||||||
Prettier('can format a basic Astro file', async () => {
|
Prettier('can format a basic Astro file', async () => {
|
||||||
const [src, out] = await getFiles('basic');
|
const [src, out] = await getFiles('basic');
|
||||||
assert.not.equal(src, out);
|
assert.not.fixture(src, out);
|
||||||
|
|
||||||
const formatted = format(src);
|
const formatted = format(src);
|
||||||
assert.equal(formatted, out);
|
assert.fixture(formatted, out);
|
||||||
});
|
});
|
||||||
|
|
||||||
Prettier('can format an Astro file with frontmatter', async () => {
|
Prettier('can format an Astro file with frontmatter', async () => {
|
||||||
const [src, out] = await getFiles('frontmatter');
|
const [src, out] = await getFiles('frontmatter');
|
||||||
assert.not.equal(src, out);
|
assert.not.fixture(src, out);
|
||||||
|
|
||||||
const formatted = format(src);
|
const formatted = format(src);
|
||||||
assert.equal(formatted, out);
|
assert.fixture(formatted, out);
|
||||||
});
|
});
|
||||||
|
|
||||||
Prettier('can format an Astro file with embedded JSX expressions', async () => {
|
Prettier('can format an Astro file with embedded JSX expressions', async () => {
|
||||||
const [src, out] = await getFiles('embedded-expr');
|
const [src, out] = await getFiles('embedded-expr');
|
||||||
assert.not.equal(src, out);
|
assert.not.fixture(src, out);
|
||||||
|
|
||||||
const formatted = format(src);
|
const formatted = format(src);
|
||||||
assert.equal(formatted, out);
|
assert.fixture(formatted, out);
|
||||||
});
|
});
|
||||||
|
|
||||||
Prettier.run();
|
Prettier.run();
|
||||||
|
|
Loading…
Add table
Reference in a new issue