Skip to content

Commit

Permalink
chore: update broken snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
lukemorales committed Apr 24, 2024
1 parent 75cd6c7 commit 9410851
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/corrupt.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,29 @@ describe('unreachable', () => {
expect(() =>
corrupt(undefined as never),
).toThrowErrorMatchingInlineSnapshot(
'"Internal Error: encountered impossible value \\"undefined\\""',
`[TypeError: Internal Error: encountered impossible value "undefined"]`,
);
});

it('handles "null', () => {
expect(() => corrupt(null as never)).toThrowErrorMatchingInlineSnapshot(
'"Internal Error: encountered impossible value \\"null\\""',
`[TypeError: Internal Error: encountered impossible value "null"]`,
);
});

it('handles strings', () => {
expect(() =>
corrupt('corrupt' as never),
).toThrowErrorMatchingInlineSnapshot(
'"Internal Error: encountered impossible value \\"corrupt\\""',
`[TypeError: Internal Error: encountered impossible value "corrupt"]`,
);
});

it('handles objects', () => {
expect(() =>
corrupt({ key: 'corrupt' } as never),
).toThrowErrorMatchingInlineSnapshot(
'"Internal Error: encountered impossible value \\"{\\"key\\":\\"corrupt\\"}\\""',
`[TypeError: Internal Error: encountered impossible value "{"key":"corrupt"}"]`,
);
});

Expand All @@ -36,31 +36,31 @@ describe('unreachable', () => {
obj.corrupt = obj;

expect(() => corrupt(obj as never)).toThrowErrorMatchingInlineSnapshot(
'"Internal Error: encountered impossible value \\"circular object\\""',
`[TypeError: Internal Error: encountered impossible value "circular object"]`,
);
});

it('handles arrays', () => {
expect(() =>
corrupt(['corrupt'] as never),
).toThrowErrorMatchingInlineSnapshot(
'"Internal Error: encountered impossible value \\"[\\"corrupt\\"]\\""',
`[TypeError: Internal Error: encountered impossible value "["corrupt"]"]`,
);
});

it('handles BigInt', () => {
expect(() =>
corrupt(BigInt(1) as never),
).toThrowErrorMatchingInlineSnapshot(
'"Internal Error: encountered impossible value \\"1 (bigint)\\""',
`[TypeError: Internal Error: encountered impossible value "1 (bigint)"]`,
);
});

it('handles Symbol', () => {
expect(() =>
corrupt(Symbol('corrupt') as never),
).toThrowErrorMatchingInlineSnapshot(
'"Internal Error: encountered impossible value \\"Symbol(corrupt)\\""',
`[TypeError: Internal Error: encountered impossible value "Symbol(corrupt)"]`,
);
});

Expand All @@ -70,7 +70,7 @@ describe('unreachable', () => {
});

expect(() => corrupt({} as never)).toThrowErrorMatchingInlineSnapshot(
'"Unexpected error: failed to stringify value"',
`[Error: Unexpected error: failed to stringify value]`,
);
});
});

0 comments on commit 9410851

Please sign in to comment.