0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-30 22:03:56 -05:00
This commit is contained in:
Matt Kane 2024-11-13 14:37:55 +00:00
parent 7977882481
commit f9ec6e2938
3 changed files with 8 additions and 8 deletions

View file

@ -202,7 +202,7 @@ describe('Content Collections - render()', () => {
assert.equal($('ul li').length, 3); assert.equal($('ul li').length, 3);
// Includes styles // Includes styles
assert.equal($('head > style').length, 2); assert.equal($('head > style').length, 3);
assert.ok($('head > style').text().includes("font-family: 'Comic Sans MS'")); assert.ok($('head > style').text().includes("font-family: 'Comic Sans MS'"));
}); });

View file

@ -101,7 +101,7 @@ describe('Content Collections - render()', () => {
assert.equal($('ul li').length, 3); assert.equal($('ul li').length, 3);
// Rendered the styles // Rendered the styles
assert.equal($('style').length, 2); assert.equal($('style').length, 3);
}, },
); );
}); });
@ -158,7 +158,7 @@ describe('Content Collections - render()', () => {
assert.equal($('ul li').length, 3); assert.equal($('ul li').length, 3);
// Rendered the styles // Rendered the styles
assert.equal($('style').length, 2); assert.equal($('style').length, 3);
}, },
); );
}); });
@ -225,7 +225,7 @@ describe('Content Collections - render()', () => {
assert.equal($('ul li').length, 3); assert.equal($('ul li').length, 3);
// Rendered the styles // Rendered the styles
assert.equal($('style').length, 2); assert.equal($('style').length, 3);
}, },
); );
}); });
@ -291,7 +291,7 @@ describe('Content Collections - render()', () => {
assert.equal($('ul li').length, 3); assert.equal($('ul li').length, 3);
// Rendered the styles // Rendered the styles
assert.equal($('style').length, 2); assert.equal($('style').length, 3);
}, },
); );
}); });

View file

@ -45,8 +45,8 @@ describe('Markdoc - propagated assets', () => {
let styleContents; let styleContents;
if (mode === 'dev') { if (mode === 'dev') {
const styles = stylesDocument.querySelectorAll('style'); const styles = stylesDocument.querySelectorAll('style');
assert.equal(styles.length, 2); assert.equal(styles.length, 3);
styleContents = styles[1].textContent; styleContents = styles[2].textContent;
} else { } else {
const links = stylesDocument.querySelectorAll('link[rel="stylesheet"]'); const links = stylesDocument.querySelectorAll('link[rel="stylesheet"]');
assert.equal(links.length, 2); assert.equal(links.length, 2);
@ -58,7 +58,7 @@ describe('Markdoc - propagated assets', () => {
it('[fails] Does not bleed styles to other page', async () => { it('[fails] Does not bleed styles to other page', async () => {
if (mode === 'dev') { if (mode === 'dev') {
const styles = scriptsDocument.querySelectorAll('style'); const styles = scriptsDocument.querySelectorAll('style');
assert.equal(styles.length, 1); assert.equal(styles.length, 2);
} else { } else {
const links = scriptsDocument.querySelectorAll('link[rel="stylesheet"]'); const links = scriptsDocument.querySelectorAll('link[rel="stylesheet"]');
assert.equal(links.length, 1); assert.equal(links.length, 1);