mirror of
https://github.com/withastro/astro.git
synced 2024-12-16 21:46:22 -05:00
[ci] yarn format
This commit is contained in:
parent
341ec3cdfd
commit
e7feb425b8
2 changed files with 10 additions and 8 deletions
|
@ -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');
|
||||
});
|
||||
|
|
|
@ -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)),
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue