summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packages/astro/test/0-css.test.js9
-rw-r--r--packages/astro/test/test-utils.js7
2 files changed, 10 insertions, 6 deletions
diff --git a/packages/astro/test/0-css.test.js b/packages/astro/test/0-css.test.js
index 1b1391f97..f6da42f23 100644
--- a/packages/astro/test/0-css.test.js
+++ b/packages/astro/test/0-css.test.js
@@ -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'
+ );
});
});
});
diff --git a/packages/astro/test/test-utils.js b/packages/astro/test/test-utils.js
index 72945d8a3..c6150b26b 100644
--- a/packages/astro/test/test-utils.js
+++ b/packages/astro/test/test-utils.js
@@ -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 });
},