[ci] yarn format

This commit is contained in:
matthewp 2021-11-29 19:24:24 +00:00 committed by GitHub Actions
parent 341ec3cdfd
commit e7feb425b8
2 changed files with 10 additions and 8 deletions

View file

@ -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 => {
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');
});

View file

@ -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)),
};
}