Skip to content

Commit

Permalink
Update markdoc tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ascorbic committed Jan 8, 2025
1 parent bbadcdc commit d7bbb08
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions packages/integrations/markdoc/test/propagated-assets.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,23 +45,23 @@ describe('Markdoc - propagated assets', () => {
let styleContents;
if (mode === 'dev') {
const styles = stylesDocument.querySelectorAll('style');
assert.equal(styles.length, 2);
styleContents = styles[1].textContent;
assert.equal(styles.length, 1);
styleContents = styles[0].textContent;
} else {
const links = stylesDocument.querySelectorAll('link[rel="stylesheet"]');
assert.equal(links.length, 2);
styleContents = await fixture.readFile(links[1].href);
assert.equal(links.length, 1);
styleContents = await fixture.readFile(links[0].href);
}
assert.equal(styleContents.includes('--color-base-purple: 269, 79%;'), true);
});

it('[fails] Does not bleed styles to other page', async () => {
if (mode === 'dev') {
const styles = scriptsDocument.querySelectorAll('style');
assert.equal(styles.length, 1);
assert.equal(styles.length, 0);
} else {
const links = scriptsDocument.querySelectorAll('link[rel="stylesheet"]');
assert.equal(links.length, 1);
assert.equal(links.length, 0);
}
});
});
Expand Down

0 comments on commit d7bbb08

Please sign in to comment.