summaryrefslogtreecommitdiff
path: root/packages/astro/test/astro-scripts.test.js
diff options
context:
space:
mode:
authorGravatar Matthew Phillips <matthew@skypack.dev> 2022-05-24 11:34:08 -0400
committerGravatar GitHub <noreply@github.com> 2022-05-24 11:34:08 -0400
commit463a1c214779e0558bcd99c30294e1a14a97232e (patch)
tree0e751042419c2320a45336251f1817adea913764 /packages/astro/test/astro-scripts.test.js
parentaf179c0d896e143d4c72868675fa3e7cc566dfcd (diff)
downloadastro-463a1c214779e0558bcd99c30294e1a14a97232e.tar.gz
astro-463a1c214779e0558bcd99c30294e1a14a97232e.tar.zst
astro-463a1c214779e0558bcd99c30294e1a14a97232e.zip
Fix: Relative imports inside of hosited script on windows (#3423)
* Failing test * Add some debugging * Normalize filename to remove @fs prefix * Adds a changeset * Break it again * Fix it * Update assertion
Diffstat (limited to '')
-rw-r--r--packages/astro/test/astro-scripts.test.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/packages/astro/test/astro-scripts.test.js b/packages/astro/test/astro-scripts.test.js
index 28c33fc51..bda290243 100644
--- a/packages/astro/test/astro-scripts.test.js
+++ b/packages/astro/test/astro-scripts.test.js
@@ -1,6 +1,5 @@
import { expect } from 'chai';
import * as cheerio from 'cheerio';
-import path from 'path';
import { loadFixture } from './test-utils.js';
describe('Scripts (hoisted and not)', () => {
@@ -50,6 +49,9 @@ describe('Scripts (hoisted and not)', () => {
// test 3: the JS exists
expect(inlineEntryJS).to.be.ok;
+
+ // test 4: Inline imported JS is included
+ expect(inlineEntryJS).to.contain("I AM IMPORTED INLINE", "The inline imported JS is included in the bundle");
});
it('External page builds the hoisted scripts to a single bundle', async () => {