mirror of
https://github.com/withastro/astro.git
synced 2025-02-17 22:44:24 -05:00
[ci] format
This commit is contained in:
parent
7b0fbd731e
commit
0c8b2193b2
2 changed files with 7 additions and 8 deletions
|
@ -257,10 +257,11 @@ async function copyFiles(fromFolder: URL, toFolder: URL) {
|
||||||
files.map(async (filename) => {
|
files.map(async (filename) => {
|
||||||
const from = new URL(filename, fromFolder);
|
const from = new URL(filename, fromFolder);
|
||||||
const to = new URL(filename, toFolder);
|
const to = new URL(filename, toFolder);
|
||||||
const lastFolder = new URL('./', to)
|
const lastFolder = new URL('./', to);
|
||||||
return fs.promises.mkdir(lastFolder, {recursive: true})
|
return fs.promises
|
||||||
.then(()=>fs.promises.copyFile(from, to) )
|
.mkdir(lastFolder, { recursive: true })
|
||||||
})
|
.then(() => fs.promises.copyFile(from, to));
|
||||||
|
})
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -170,13 +170,11 @@ describe('Static build', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('Static build SSR', () => {
|
describe('Static build SSR', () => {
|
||||||
|
|
||||||
it('Copies public files', async () => {
|
it('Copies public files', async () => {
|
||||||
const fixture = await loadFixture({
|
const fixture = await loadFixture({
|
||||||
root: './fixtures/static build SSR/',
|
root: './fixtures/static build SSR/',
|
||||||
});
|
});
|
||||||
await fixture.build()
|
await fixture.build();
|
||||||
const asset = await fixture.readFile('/client/nested/asset2.txt');
|
const asset = await fixture.readFile('/client/nested/asset2.txt');
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Reference in a new issue