summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar matthewp <matthewp@users.noreply.github.com> 2021-11-29 19:24:24 +0000
committerGravatar GitHub Actions <actions@github.com> 2021-11-29 19:24:24 +0000
commite7feb425b838c749b5c4bf3d28e2ecab37ba246b (patch)
tree744c92b4cebee13c60eed835ddfc29115ed7ea97
parent341ec3cdfd15faa5e28b893fca444e423eba174e (diff)
downloadastro-e7feb425b838c749b5c4bf3d28e2ecab37ba246b.tar.gz
astro-e7feb425b838c749b5c4bf3d28e2ecab37ba246b.tar.zst
astro-e7feb425b838c749b5c4bf3d28e2ecab37ba246b.zip
[ci] yarn format
-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)),
};
}