diff --git a/packages/wrangler/src/__tests__/configuration.test.ts b/packages/wrangler/src/__tests__/configuration.test.ts index d5750d868343..0f13388adb5e 100644 --- a/packages/wrangler/src/__tests__/configuration.test.ts +++ b/packages/wrangler/src/__tests__/configuration.test.ts @@ -1123,7 +1123,7 @@ describe("normalizeAndValidateConfig()", () => { describe("name", () => { it("should error on invalid `name` value with spaces", () => { const expectedConfig: RawEnvironment = { - name: "NCC 1701 D", + name: "this has spaces", } as unknown as RawEnvironment; const { config, diagnostics } = normalizeAndValidateConfig( @@ -1134,10 +1134,11 @@ describe("normalizeAndValidateConfig()", () => { expect(config).toEqual(expect.objectContaining(expectedConfig)); expect(diagnostics.hasWarnings()).toBe(false); + expect(diagnostics.renderErrors()).toMatchInlineSnapshot(` - "Processing wrangler configuration: - - Expected \\"name\\" to be of type string, alphanumeric and lowercase with dashes only but got \\"NCC 1701 D\\"." - `); + "Processing wrangler configuration: + - Expected \\"name\\" to be of type string, alphanumeric and lowercase with dashes only but got \\"this has spaces\\"." + `); }); it("should be valid `name` with underscores", () => {