Skip to content

Commit

Permalink
Fix more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bluwy committed Mar 3, 2025
1 parent bb30189 commit b2c3b05
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions packages/astro/test/astro-css-bundling.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ describe('CSS Bundling', function () {
}
});

it('there are 4 css files', async () => {
it('there are 5 css files', async () => {
const dir = await fixture.readdir('/_astro');
assert.equal(dir.length, 4);
assert.equal(dir.length, 5);
});

it('CSS includes hashes', async () => {
Expand Down Expand Up @@ -96,9 +96,9 @@ describe('CSS Bundling', function () {
await fixture.build({ mode: 'production' });
});

it('there are 4 css files', async () => {
it('there are 5 css files', async () => {
const dir = await fixture.readdir('/assets');
assert.equal(dir.length, 4);
assert.equal(dir.length, 5);
});

it('CSS does not include hashes', async () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/astro/test/config-vite.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ describe('Vite Config', async () => {
it('Allows overriding bundle naming options in the build', async () => {
const html = await fixture.readFile('/index.html');
const $ = cheerio.load(html);
assert.match($('link').attr('href'), /\/assets\/testing-[a-z\d]+\.css/);
assert.match($('link').attr('href'), /\/assets\/testing-.+\.css/);
});
});

Expand Down
4 changes: 2 additions & 2 deletions packages/astro/test/css-inline-stylesheets.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ describe('Setting inlineStylesheets to auto in static output', () => {

// the count of style/link tags depends on our css chunking logic
// this test should be updated if it changes
assert.equal($('style').length, 3);
assert.equal($('style').length, 2);
assert.equal($('link[rel=stylesheet]').length, 1);
});

Expand Down Expand Up @@ -162,7 +162,7 @@ describe('Setting inlineStylesheets to auto in server output', () => {

// the count of style/link tags depends on our css chunking logic
// this test should be updated if it changes
assert.equal($('style').length, 3);
assert.equal($('style').length, 2);
assert.equal($('link[rel=stylesheet]').length, 1);
});

Expand Down
2 changes: 1 addition & 1 deletion packages/astro/test/css-order.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ describe('CSS production ordering', () => {
);

assert.ok(content.length, 3, 'there are 3 stylesheets');
const [, sharedStyles, pageStyles] = content;
const [, pageStyles, sharedStyles] = content;

assert.ok(/red/.exec(sharedStyles.css));
assert.ok(/#00f/.exec(pageStyles.css));
Expand Down

0 comments on commit b2c3b05

Please sign in to comment.