mirror of
https://github.com/withastro/astro.git
synced 2024-12-23 21:53:55 -05:00
d252fc61b0
* Add tailwindcss nesting support * Update lockfile
33 lines
814 B
JavaScript
33 lines
814 B
JavaScript
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
|
|
});
|
|
});
|
|
});
|