Skip to content

Commit 18cfe14

Browse files
fix
1 parent 7305674 commit 18cfe14

3 files changed

Lines changed: 172 additions & 8 deletions

File tree

deno.lock

Lines changed: 159 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

plugin-vite/tests/build_test.ts

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,10 @@ Deno.test({
1212
await using res = await buildVite();
1313

1414
await withChildProcessServer(
15-
res.tmp,
16-
["serve", "-A", "--port", "0", "_fresh/server.js"],
15+
{
16+
cwd: res.tmp,
17+
args: ["serve", "-A", "--port", "0", "_fresh/server.js"],
18+
},
1719
async (address) => {
1820
const res = await fetch(address);
1921
const text = await res.text();
@@ -31,8 +33,10 @@ Deno.test({
3133
await using res = await buildVite();
3234

3335
await withChildProcessServer(
34-
res.tmp,
35-
["serve", "-A", "--port", "0", "_fresh/server.js"],
36+
{
37+
cwd: res.tmp,
38+
args: ["serve", "-A", "--port", "0", "_fresh/server.js"],
39+
},
3640
async (address) => {
3741
const res = await fetch(`${address}/test_static/foo.txt`);
3842
const text = await res.text();
@@ -50,8 +54,10 @@ Deno.test({
5054
await using res = await buildVite();
5155

5256
await withChildProcessServer(
53-
res.tmp,
54-
["serve", "-A", "--port", "0", "_fresh/server.js"],
57+
{
58+
cwd: res.tmp,
59+
args: ["serve", "-A", "--port", "0", "_fresh/server.js"],
60+
},
5561
async (address) => {
5662
await withBrowser(async (page) => {
5763
await page.goto(`${address}/tests/island_hooks`, {

plugin-vite/tests/test_utils.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,7 @@ export default defineConfig({
7070
);
7171

7272
await withChildProcessServer(
73-
tmp.dir,
74-
["run", "-A", "npm:vite"],
73+
{ cwd: tmp.dir, args: ["run", "-A", "npm:vite"] },
7574
(address) => fn(address, tmp.dir),
7675
);
7776
}

0 commit comments

Comments
 (0)