Skip to content

Commit 11e6b9a

Browse files
fix unstable_dev tests
1 parent 42e30c8 commit 11e6b9a

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

packages/wrangler/e2e/dev-registry.test.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,27 +99,25 @@ describe("unstable_dev()", () => {
9999
const childWorker = await unstable_dev(
100100
"${child.replaceAll("\\", "/")}/src/index.ts",
101101
{
102-
configPath: "${child.replaceAll("\\", "/")}/wrangler.toml",
103102
experimental: {
104103
disableExperimentalWarning: true,
105104
},
106105
}
107106
);
108107
108+
// Wait long enough for the child to register itself on the Worker Registry
109+
// before we boot up the parent that needs to know about it.
109110
await setTimeout(2000)
110111
111112
const parentWorker = await unstable_dev(
112113
"src/index.ts",
113114
{
114-
configPath: "wrangler.toml",
115115
experimental: {
116116
disableExperimentalWarning: true,
117117
},
118118
}
119119
);
120120
121-
await setTimeout(2000)
122-
123121
console.log(await parentWorker.fetch("/").then(r => r.text()))
124122
125123
process.exit(0);

packages/wrangler/src/__tests__/config/findWranglerConfig.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ describe("config findWranglerConfig()", () => {
1212

1313
describe("(useRedirect: false)", () => {
1414
it.each(["toml", "json", "jsonc"])(
15-
"should find the nearest wrangler.%s to the current working directory",
15+
"should find the nearest wrangler.%s to the reference directory",
1616
async (ext) => {
1717
await seed({
1818
[`wrangler.${ext}`]: "DUMMY",

packages/wrangler/src/api/startDevWorker/ConfigController.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -416,6 +416,7 @@ export class ConfigController extends Controller<ConfigControllerEventMap> {
416416
try {
417417
const fileConfig = readConfig(
418418
{
419+
script: input.entrypoint,
419420
config: input.config,
420421
env: input.env,
421422
"dispatch-namespace": undefined,

0 commit comments

Comments
 (0)