Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
penalosa committed Aug 27, 2024
1 parent eaced0d commit 25d04ad
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions packages/wrangler/src/__tests__/configuration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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", () => {
Expand Down

0 comments on commit 25d04ad

Please sign in to comment.