Skip to content

Commit f6bce8a

Browse files
committed
various test fixes after rebase
1 parent c5175e3 commit f6bce8a

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
@@ -4307,6 +4307,7 @@ describe("normalizeAndValidateConfig()", () => {
43074307
expect(diagnostics.hasErrors()).toBe(true);
43084308
expect(diagnostics.renderErrors()).toMatchInlineSnapshot(`
43094309
"Processing wrangler configuration:
4310+
43104311
- \\"env.ENV1\\" environment configuration
43114312
- Removed: \\"node_compat\\":
43124313
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
@@ -278,7 +278,7 @@ describe("wrangler", () => {
278278
});
279279
});
280280

281-
it("should print a deprecation message for 'build' and then try to run `deploy --dry-run --outdir`", async () => {
281+
it("build should run `deploy --dry-run --outdir`", async () => {
282282
writeWranglerConfig({
283283
main: "index.js",
284284
});
@@ -287,6 +287,7 @@ describe("wrangler", () => {
287287
await endEventLoop();
288288
expect(std.out).toMatchInlineSnapshot(`
289289
"Total Upload: xx KiB / gzip: xx KiB
290+
No bindings found.
290291
--dry-run: exiting now."
291292
`);
292293
});

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -795,7 +795,7 @@ describe("wrangler", () => {
795795
796796
GLOBAL FLAGS
797797
-c, --config Path to Wrangler configuration file [string]
798-
-e, --env Environment to use for operations and .env files [string]
798+
-e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string]
799799
-h, --help Show help [boolean]
800800
-v, --version Show version number [boolean]
801801
@@ -1738,7 +1738,7 @@ describe("wrangler", () => {
17381738
keys.map((k) => k.name)
17391739
);
17401740
await runWrangler(
1741-
`kv bulk delete --namespace-id some-namespace-id keys.json`
1741+
`kv bulk delete --remote --namespace-id some-namespace-id keys.json`
17421742
);
17431743
expect(requests.count).toEqual(1);
17441744
expect(std.out).toMatchInlineSnapshot(`"Success!"`);

0 commit comments

Comments
 (0)