diff options
author | 2023-12-28 00:34:01 +0700 | |
---|---|---|
committer | 2023-12-27 12:34:01 -0500 | |
commit | d252fc61b04c1491f51822f5e23fabd404d84d40 (patch) | |
tree | 25fdb45853238821af98fac9f720887c4ff7aaeb /packages/integrations/tailwind/test/basic.test.js | |
parent | cf993bc263b58502096f00d383266cd179f331af (diff) | |
download | astro-d252fc61b04c1491f51822f5e23fabd404d84d40.tar.gz astro-d252fc61b04c1491f51822f5e23fabd404d84d40.tar.zst astro-d252fc61b04c1491f51822f5e23fabd404d84d40.zip |
Add tailwindcss nesting support (#9529)
* Add tailwindcss nesting support
* Update lockfile
Diffstat (limited to 'packages/integrations/tailwind/test/basic.test.js')
-rw-r--r-- | packages/integrations/tailwind/test/basic.test.js | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/packages/integrations/tailwind/test/basic.test.js b/packages/integrations/tailwind/test/basic.test.js new file mode 100644 index 000000000..e5275c81e --- /dev/null +++ b/packages/integrations/tailwind/test/basic.test.js @@ -0,0 +1,33 @@ +import { expect } from 'chai'; +import { loadFixture } from '../../../astro/test/test-utils.js'; + +describe('Basic', () => { + let fixture; + + before(async () => { + fixture = await loadFixture({ + root: new URL('./fixtures/basic/', import.meta.url), + }); + }); + + describe('build', () => { + before(async () => { + await fixture.build(); + }); + + it('works', async () => { + const astroChunkDir = await fixture.readdir('/_astro'); + + let css = ''; + for (const file of astroChunkDir) { + if (file.endsWith('.css')) { + css += await fixture.readFile(`/_astro/${file}`); + } + } + + expect(css).to.include('box-sizing:border-box;'); // base css + expect(css).to.include('text-red-500'); // class css + expect(css).to.match(/\.a\[data-astro-cid-.*?\] \.b\[data-astro-cid-.*?\]/); // nesting + }); + }); +}); |