[ci] format

This commit is contained in:
matthewp 2022-09-06 19:05:35 +00:00 committed by fredkbot
parent 307b7b97ce
commit d1d1e0ec12
2 changed files with 10 additions and 6 deletions

View file

@ -364,13 +364,16 @@ describe('CSS', function () {
let foundVitePreloadCSS = false;
const bundledJS = await fixture.glob('**/*.?(m)js');
for(const filename of bundledJS) {
for (const filename of bundledJS) {
const content = await fixture.readFile(filename);
if(content.match(/ReactDynamic\..*\.css/)) {
if (content.match(/ReactDynamic\..*\.css/)) {
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'
);
});
});
});

View file

@ -149,9 +149,10 @@ export async function loadFixture(inlineConfig) {
readFile: (filePath) =>
fs.promises.readFile(new URL(filePath.replace(/^\//, ''), config.outDir), 'utf8'),
readdir: (fp) => fs.promises.readdir(new URL(fp.replace(/^\//, ''), config.outDir)),
glob: (p) => fastGlob(p, {
cwd: fileURLToPath(config.outDir)
}),
glob: (p) =>
fastGlob(p, {
cwd: fileURLToPath(config.outDir),
}),
clean: async () => {
await fs.promises.rm(config.outDir, { maxRetries: 10, recursive: true, force: true });
},