summaryrefslogtreecommitdiff
path: root/packages/astro/test/static-build-dir.test.js
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--packages/astro/test/static-build-dir.test.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/packages/astro/test/static-build-dir.test.js b/packages/astro/test/static-build-dir.test.js
index d09756af2..d6a8c90c3 100644
--- a/packages/astro/test/static-build-dir.test.js
+++ b/packages/astro/test/static-build-dir.test.js
@@ -4,6 +4,8 @@ import { loadFixture } from './test-utils.js';
describe('Static build: dir takes the URL path to the output directory', () => {
/** @type {URL} */
let checkDir;
+ /** @type {URL} */
+ let checkGeneratedDir;
before(async () => {
const fixture = await loadFixture({
root: './fixtures/static-build-dir/',
@@ -11,6 +13,9 @@ describe('Static build: dir takes the URL path to the output directory', () => {
{
name: '@astrojs/dir',
hooks: {
+ 'astro:build:generated': ({ dir }) => {
+ checkGeneratedDir = dir;
+ },
'astro:build:done': ({ dir }) => {
checkDir = dir;
},
@@ -25,5 +30,6 @@ describe('Static build: dir takes the URL path to the output directory', () => {
expect(removeTrailingSlash(checkDir.toString())).to.be.equal(
removeTrailingSlash(new URL('./fixtures/static-build-dir/dist', import.meta.url).toString())
);
+ expect(checkDir.toString()).to.be.equal(checkGeneratedDir.toString());
});
});