[ci] format
This commit is contained in:
parent
307b7b97ce
commit
d1d1e0ec12
2 changed files with 10 additions and 6 deletions
|
@ -364,13 +364,16 @@ describe('CSS', function () {
|
||||||
|
|
||||||
let foundVitePreloadCSS = false;
|
let foundVitePreloadCSS = false;
|
||||||
const bundledJS = await fixture.glob('**/*.?(m)js');
|
const bundledJS = await fixture.glob('**/*.?(m)js');
|
||||||
for(const filename of bundledJS) {
|
for (const filename of bundledJS) {
|
||||||
const content = await fixture.readFile(filename);
|
const content = await fixture.readFile(filename);
|
||||||
if(content.match(/ReactDynamic\..*\.css/)) {
|
if (content.match(/ReactDynamic\..*\.css/)) {
|
||||||
foundVitePreloadCSS = filename;
|
foundVitePreloadCSS = filename;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
expect(foundVitePreloadCSS).to.equal(false, 'Should not have found a preload for the dynamic CSS');
|
expect(foundVitePreloadCSS).to.equal(
|
||||||
|
false,
|
||||||
|
'Should not have found a preload for the dynamic CSS'
|
||||||
|
);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -149,9 +149,10 @@ export async function loadFixture(inlineConfig) {
|
||||||
readFile: (filePath) =>
|
readFile: (filePath) =>
|
||||||
fs.promises.readFile(new URL(filePath.replace(/^\//, ''), config.outDir), 'utf8'),
|
fs.promises.readFile(new URL(filePath.replace(/^\//, ''), config.outDir), 'utf8'),
|
||||||
readdir: (fp) => fs.promises.readdir(new URL(fp.replace(/^\//, ''), config.outDir)),
|
readdir: (fp) => fs.promises.readdir(new URL(fp.replace(/^\//, ''), config.outDir)),
|
||||||
glob: (p) => fastGlob(p, {
|
glob: (p) =>
|
||||||
cwd: fileURLToPath(config.outDir)
|
fastGlob(p, {
|
||||||
}),
|
cwd: fileURLToPath(config.outDir),
|
||||||
|
}),
|
||||||
clean: async () => {
|
clean: async () => {
|
||||||
await fs.promises.rm(config.outDir, { maxRetries: 10, recursive: true, force: true });
|
await fs.promises.rm(config.outDir, { maxRetries: 10, recursive: true, force: true });
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Reference in a new issue