diff options
author | 2023-04-13 09:01:47 +0000 | |
---|---|---|
committer | 2023-04-13 09:01:47 +0000 | |
commit | 44d935d5d6e2162e247783e0eb1031f77c2dcb35 (patch) | |
tree | 4f8c547b060f3c7431443ddb5ce8edceaac93795 | |
parent | a6bec9c1b74e5059af829a164e2a66619246e79c (diff) | |
download | astro-44d935d5d6e2162e247783e0eb1031f77c2dcb35.tar.gz astro-44d935d5d6e2162e247783e0eb1031f77c2dcb35.tar.zst astro-44d935d5d6e2162e247783e0eb1031f77c2dcb35.zip |
[ci] format
-rw-r--r-- | packages/astro/src/core/build/static-build.ts | 7 | ||||
-rw-r--r-- | packages/astro/test/custom-assets-name.test.js | 2 |
2 files changed, 4 insertions, 5 deletions
diff --git a/packages/astro/src/core/build/static-build.ts b/packages/astro/src/core/build/static-build.ts index b99890b82..1ef57d787 100644 --- a/packages/astro/src/core/build/static-build.ts +++ b/packages/astro/src/core/build/static-build.ts @@ -385,15 +385,14 @@ async function ssrMoveAssets(opts: StaticBuildOptions) { }); if (files.length > 0) { - await Promise.all( files.map(async (filename) => { const currentUrl = new URL(filename, appendForwardSlash(serverAssets.toString())); const clientUrl = new URL(filename, appendForwardSlash(clientAssets.toString())); - const dir = new URL(path.parse(clientUrl.href).dir) - // It can't find this file because the user defines a custom path + const dir = new URL(path.parse(clientUrl.href).dir); + // It can't find this file because the user defines a custom path // that includes the folder paths in `assetFileNames - if(!fs.existsSync(dir)) await fs.promises.mkdir(dir, { recursive: true }); + if (!fs.existsSync(dir)) await fs.promises.mkdir(dir, { recursive: true }); return fs.promises.rename(currentUrl, clientUrl); }) ); diff --git a/packages/astro/test/custom-assets-name.test.js b/packages/astro/test/custom-assets-name.test.js index 345a9d2a7..c44116921 100644 --- a/packages/astro/test/custom-assets-name.test.js +++ b/packages/astro/test/custom-assets-name.test.js @@ -14,7 +14,7 @@ describe('custom the assets name function', () => { }); it('It cant find this file cause the node throws an error if the users custom a path that includes the folder path', async () => { - const csslength = await fixture.readFile('client/assets/css/a.css') + const csslength = await fixture.readFile('client/assets/css/a.css'); /** @type {Set<string>} */ expect(!!csslength).to.equal(true); }); |