diff options
Diffstat (limited to 'packages/astro/test/0-css.test.js')
-rw-r--r-- | packages/astro/test/0-css.test.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/packages/astro/test/0-css.test.js b/packages/astro/test/0-css.test.js index 3d91b6135..63e6bfe67 100644 --- a/packages/astro/test/0-css.test.js +++ b/packages/astro/test/0-css.test.js @@ -18,6 +18,7 @@ describe('CSS', function () { // test HTML and CSS contents for accuracy describe('build', () => { let $; + let html; let bundledCSS; before(async () => { @@ -25,7 +26,7 @@ describe('CSS', function () { await fixture.build(); // get bundled CSS (will be hashed, hence DOM query) - const html = await fixture.readFile('/index.html'); + html = await fixture.readFile('/index.html'); $ = cheerio.load(html); const bundledCSSHREF = $('link[rel=stylesheet][href^=/assets/]').attr('href'); bundledCSS = (await fixture.readFile(bundledCSSHREF.replace(/^\/?/, '/'))) @@ -49,6 +50,10 @@ describe('CSS', function () { expect(bundledCSS).to.include(expected); }); + it('Generated link tags are void elements', async () => { + expect(html).to.not.include("</link>"); + }); + it('No <style> skips scoping', async () => { // Astro component without <style> should not include scoped class expect($('#no-scope').attr('class')).to.equal(undefined); |