summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packages/astro/test/astro-envs.test.js16
-rw-r--r--packages/astro/test/test-utils.js2
2 files changed, 10 insertions, 8 deletions
diff --git a/packages/astro/test/astro-envs.test.js b/packages/astro/test/astro-envs.test.js
index 7e0c40026..23946f097 100644
--- a/packages/astro/test/astro-envs.test.js
+++ b/packages/astro/test/astro-envs.test.js
@@ -28,14 +28,16 @@ describe('Environment Variables', () => {
// Look in all of the .js files to see if the public env is inlined.
// Testing this way prevents hardcoding expected js files.
// If we find it in any of them that's good enough to know its working.
- await Promise.all(dirs.map(async path => {
- if(path.endsWith('.js')) {
- let js = await fixture.readFile(`/assets/${path}`);
- if(js.includes('BLUE_BAYOU')) {
- found = true;
+ await Promise.all(
+ dirs.map(async (path) => {
+ if (path.endsWith('.js')) {
+ let js = await fixture.readFile(`/assets/${path}`);
+ if (js.includes('BLUE_BAYOU')) {
+ found = true;
+ }
}
- }
- }));
+ })
+ );
expect(found).to.equal(true, 'found the env variable in the JS build');
});
diff --git a/packages/astro/test/test-utils.js b/packages/astro/test/test-utils.js
index 302191867..cf3f947b8 100644
--- a/packages/astro/test/test-utils.js
+++ b/packages/astro/test/test-utils.js
@@ -71,7 +71,7 @@ export async function loadFixture(inlineConfig) {
return previewServer;
},
readFile: (filePath) => fs.promises.readFile(new URL(filePath.replace(/^\//, ''), config.dist), 'utf8'),
- readdir: (fp) => fs.promises.readdir(new URL(fp.replace(/^\//, ''), config.dist))
+ readdir: (fp) => fs.promises.readdir(new URL(fp.replace(/^\//, ''), config.dist)),
};
}