mirror of
https://github.com/withastro/astro.git
synced 2025-01-06 22:10:10 -05:00
chore: migrate static-build-vite-plugins.test.js
to node:test
(#10050)
This commit is contained in:
parent
aef8730f65
commit
322b2b6c72
1 changed files with 4 additions and 9 deletions
|
@ -1,4 +1,5 @@
|
||||||
import { expect } from 'chai';
|
import assert from 'node:assert/strict';
|
||||||
|
import { before, describe, it } from 'node:test';
|
||||||
import { loadFixture } from './test-utils.js';
|
import { loadFixture } from './test-utils.js';
|
||||||
|
|
||||||
describe('Static build: vite plugins included when required', () => {
|
describe('Static build: vite plugins included when required', () => {
|
||||||
|
@ -74,15 +75,9 @@ describe('Static build: vite plugins included when required', () => {
|
||||||
await fixture.build();
|
await fixture.build();
|
||||||
});
|
});
|
||||||
it('Vite Plugins are included/excluded properly', async () => {
|
it('Vite Plugins are included/excluded properly', async () => {
|
||||||
expect(pluginsCalled.size).to.equal(
|
assert.equal(pluginsCalled.size, expectedPluginResult.size, 'Not all plugins were initialized');
|
||||||
expectedPluginResult.size,
|
|
||||||
'Not all plugins were initialized'
|
|
||||||
);
|
|
||||||
Array.from(expectedPluginResult.entries()).forEach(([plugin, called]) =>
|
Array.from(expectedPluginResult.entries()).forEach(([plugin, called]) =>
|
||||||
expect(pluginsCalled.get(plugin)).to.equal(
|
assert.equal(pluginsCalled.get(plugin), called, `${plugin} was ${called ? 'not' : ''} called`)
|
||||||
called,
|
|
||||||
`${plugin} was ${called ? 'not' : ''} called`
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
});
|
});
|
Loading…
Reference in a new issue