Skip to content

Commit dff37da

Browse files
committed
various test fixes after rebase
1 parent 5564e68 commit dff37da

File tree

5 files changed

+6
-45
lines changed

5 files changed

+6
-45
lines changed

packages/wrangler/src/__tests__/config-validation-pages.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,8 +244,8 @@ describe("validatePagesConfig()", () => {
244244
expect(diagnostics.renderErrors()).toMatchInlineSnapshot(`
245245
"Running configuration file validation for Pages:
246246
- Configuration file for Pages projects does not support \\"triggers\\"
247-
- Configuration file for Pages projects does not support \\"usage_model\\"
248247
- Configuration file for Pages projects does not support \\"build\\"
248+
- Configuration file for Pages projects does not support \\"usage_model\\""
249249
`);
250250

251251
// test with non-inheritable environment config fields

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4310,6 +4310,7 @@ describe("normalizeAndValidateConfig()", () => {
43104310
expect(diagnostics.hasErrors()).toBe(true);
43114311
expect(diagnostics.renderErrors()).toMatchInlineSnapshot(`
43124312
"Processing wrangler configuration:
4313+
43134314
- \\"env.ENV1\\" environment configuration
43144315
- Removed: \\"node_compat\\":
43154316
The \\"node_compat\\" field is no longer supported as of Wrangler v4. Instead, use the \`nodejs_compat\` compatibility flag. This includes the functionality from legacy \`node_compat\` polyfills and natively implemented Node.js APIs. See https://developers.cloudflare.com/workers/runtime-apis/nodejs for more information."

packages/wrangler/src/__tests__/dev.test.ts

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1518,47 +1518,6 @@ describe.sequential("wrangler dev", () => {
15181518
});
15191519
});
15201520

1521-
describe("--inspect", () => {
1522-
it("should warn if --inspect is used", async () => {
1523-
fs.writeFileSync("index.js", `export default {};`);
1524-
await runWranglerUntilConfig("dev index.js --inspect");
1525-
expect(std.warn).toMatchInlineSnapshot(`
1526-
"▲ [WARNING] Passing --inspect is unnecessary, now you can always connect to devtools.
1527-
1528-
"
1529-
`);
1530-
});
1531-
});
1532-
1533-
describe("--log-level", () => {
1534-
it("should not output warnings with log-level 'none'", async () => {
1535-
fs.writeFileSync("index.js", `export default {};`);
1536-
await runWranglerUntilConfig("dev index.js --inspect --log-level none");
1537-
expect(std.warn).toMatchInlineSnapshot(`""`);
1538-
});
1539-
1540-
it("should output warnings with log-level 'warn'", async () => {
1541-
fs.writeFileSync("index.js", `export default {};`);
1542-
await runWranglerUntilConfig("dev index.js --inspect --log-level warn");
1543-
expect(std.warn).toMatchInlineSnapshot(`
1544-
"▲ [WARNING] Passing --inspect is unnecessary, now you can always connect to devtools.
1545-
1546-
"
1547-
`);
1548-
});
1549-
1550-
it("should also set log level using WRANGLER_LOG'", async () => {
1551-
fs.writeFileSync("index.js", `export default {};`);
1552-
vi.stubEnv("WRANGLER_LOG", "none");
1553-
await runWranglerUntilConfig("dev index.js --inspect");
1554-
expect(std.warn).toMatchInlineSnapshot(`""`);
1555-
1556-
vi.stubEnv("WRANGLER_LOG", "debug");
1557-
await runWranglerUntilConfig("dev index.js");
1558-
expect(std.debug).toContain(".env file not found at");
1559-
});
1560-
});
1561-
15621521
describe("--show-interactive-dev-session", () => {
15631522
it("should show interactive dev session with --show-interactive-dev-session", async () => {
15641523
fs.writeFileSync("index.js", `export default { }`);

packages/wrangler/src/__tests__/index.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ describe("wrangler", () => {
293293
});
294294
});
295295

296-
it("should print a deprecation message for 'build' and then try to run `deploy --dry-run --outdir`", async () => {
296+
it("build should run `deploy --dry-run --outdir`", async () => {
297297
writeWranglerConfig({
298298
main: "index.js",
299299
});
@@ -302,6 +302,7 @@ describe("wrangler", () => {
302302
await endEventLoop();
303303
expect(std.out).toMatchInlineSnapshot(`
304304
"Total Upload: xx KiB / gzip: xx KiB
305+
No bindings found.
305306
--dry-run: exiting now."
306307
`);
307308
});

packages/wrangler/src/__tests__/kv.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -804,7 +804,7 @@ describe("wrangler", () => {
804804
805805
GLOBAL FLAGS
806806
-c, --config Path to Wrangler configuration file [string]
807-
-e, --env Environment to use for operations and .env files [string]
807+
-e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string]
808808
-h, --help Show help [boolean]
809809
-v, --version Show version number [boolean]
810810
@@ -1751,7 +1751,7 @@ describe("wrangler", () => {
17511751
keys.map((k) => k.name)
17521752
);
17531753
await runWrangler(
1754-
`kv bulk delete --namespace-id some-namespace-id keys.json`
1754+
`kv bulk delete --remote --namespace-id some-namespace-id keys.json`
17551755
);
17561756
expect(requests.count).toEqual(1);
17571757
expect(std.out).toMatchInlineSnapshot(`"Success!"`);

0 commit comments

Comments
 (0)