summaryrefslogtreecommitdiff
path: root/packages/astro/test/astro-sync.test.js
diff options
context:
space:
mode:
Diffstat (limited to 'packages/astro/test/astro-sync.test.js')
-rw-r--r--packages/astro/test/astro-sync.test.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/packages/astro/test/astro-sync.test.js b/packages/astro/test/astro-sync.test.js
index e9ab90cf7..3e5a9bcbf 100644
--- a/packages/astro/test/astro-sync.test.js
+++ b/packages/astro/test/astro-sync.test.js
@@ -209,10 +209,15 @@ describe('astro sync', () => {
assert.fail();
}
});
- it('Does not throw if a virtual module is imported in content.config.ts', async () => {
+ it('Does not throw if a virtual module is imported in content.config.ts or import.meta.env is not loaded', async () => {
try {
await fixture.load('./fixtures/astro-env-content-collections/');
fixture.clean();
+ fs.writeFileSync(
+ new URL('./fixtures/astro-env-content-collections/.env', import.meta.url),
+ 'BAR=abc',
+ 'utf-8',
+ );
await fixture.whenSyncing();
assert.ok(true);
} catch {