Skip to content

Commit

Permalink
fix: inconsistent test
Browse files Browse the repository at this point in the history
  • Loading branch information
rturnq committed Apr 4, 2024
1 parent 4708884 commit 06933a2
Show file tree
Hide file tree
Showing 14 changed files with 57 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
src="/assets/logo-[hash].svg"
/>
<script
async=""
src="./script.js"
/>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@
src="/assets/logo-[hash].svg"
/>
<script
async=""
src="./script.js"
/>
<script
async=""
src="/assets/script-[hash].js"
/>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,16 @@
src="/assets/logo-[hash].svg"
/>
<script
async=""
src="./script.js"
/>
<script
async=""
src="/assets/script-[hash].js"
/>
<link
href="./styles.css"
rel="stylesheet"
/>
<link
href="/assets/styles-[hash].css"
rel="stylesheet"
/>
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<div
id="clickable"
>
Mounted: true Clicks: 0
Mounted: false Clicks: 0
<img
alt="logo"
src="/assets/logo-[hash].svg"
Expand All @@ -14,9 +14,11 @@
src="/assets/logo-[hash].svg"
/>
<script
async=""
src="./script.js"
/>
<script
async=""
src="/assets/script-[hash].js"
/>
<link
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<div
id="implicit"
>
<div
id="clickable"
>
Mounted: true Clicks: 0
<img
alt="logo"
src="/assets/logo-[hash].svg"
/>
<img
alt="logo"
src="/assets/logo-[hash].svg"
/>
<script
async=""
src="./script.js"
/>
<script
async=""
src="/assets/script-[hash].js"
/>
<link
href="./styles.css"
rel="stylesheet"
/>
<link
href="/assets/styles-[hash].css"
rel="stylesheet"
/>
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@
src="/assets/logo-[hash].svg"
/>
<script
async=""
src="./script.js"
/>
<script
async=""
src="/assets/script-[hash].js"
/>
<link
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
src="/src/components/logo.svg"
/>
<script
async=""
src="./script.js"
/>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@
src="/src/components/logo.svg"
/>
<script
async=""
src="./script.js"
/>
<script
async=""
src="/src/components/script.js"
/>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@
src="/src/components/logo.svg"
/>
<script
async=""
src="./script.js"
/>
<script
async=""
src="/src/components/script.js"
/>
<link
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@
src="/src/components/logo.svg"
/>
<script
async=""
src="./script.js"
/>
<script
async=""
src="/src/components/script.js"
/>
<link
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@
src="/src/components/logo.svg"
/>
<script
async=""
src="./script.js"
/>
<script
async=""
src="/src/components/script.js"
/>
<link
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@
src="/src/components/logo.svg"
/>
<script
async=""
src="./script.js"
/>
<script
async=""
src="/src/components/script.js"
/>
<link
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@ import path from "path";
import url from "url";
import { createServer } from "http";
import serve from "serve-handler";

globalThis.assetsPath = "/my-prefix/";
// dyanmic import so globalThis.assetsPath can be set prior to the imported code executing
const { handler } = await import("./dist/index.mjs");
import { handler } from "./dist/index.mjs";

const __dirname = path.dirname(url.fileURLToPath(import.meta.url));
const serveOpts = { public: path.resolve(__dirname, "dist") };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ class {

<img src="./logo.svg" alt="logo">
<img src="./logo.svg?url" alt="logo">
<script src="./script.js"/>
<script src="./script.js?url"/>
<script src="./script.js" async/>
<script src="./script.js?url" async/>
<link rel="stylesheet" href="./styles.css">
<link rel="stylesheet" href="./styles.css?url">
</div>

0 comments on commit 06933a2

Please sign in to comment.