Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
SBoudrias committed Jul 28, 2024
1 parent 884ae04 commit 8818c91
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/checkbox/checkbox.test.mts
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ describe('checkbox prompt', () => {
});

await expect(answer).rejects.toThrowErrorMatchingInlineSnapshot(
`[Error: [checkbox prompt] No selectable choices. All choices are disabled.]`,
`[ValidationError: [checkbox prompt] No selectable choices. All choices are disabled.]`,
);
await expect(answer).rejects.toBeInstanceOf(ValidationError);
});
Expand Down
6 changes: 3 additions & 3 deletions packages/core/core.test.mts
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ describe('Error handling', () => {
const { answer } = await render(prompt, { message: 'Question' });

await expect(answer).rejects.toThrowErrorMatchingInlineSnapshot(
`[Error: useEffect return value must be a cleanup function or nothing.]`,
`[ValidationError: useEffect return value must be a cleanup function or nothing.]`,
);
await expect(answer).rejects.toBeInstanceOf(ValidationError);
});
Expand All @@ -559,7 +559,7 @@ describe('Error handling', () => {
expect(() => {
useEffect(() => {}, []);
}).toThrowErrorMatchingInlineSnapshot(
`[Error: [Inquirer] Hook functions can only be called from within a prompt]`,
`[HookError: [Inquirer] Hook functions can only be called from within a prompt]`,
);
expect(() => {
useEffect(() => {}, []);
Expand All @@ -570,7 +570,7 @@ describe('Error handling', () => {
expect(() => {
useKeypress(() => {});
}).toThrowErrorMatchingInlineSnapshot(
`[Error: [Inquirer] Hook functions can only be called from within a prompt]`,
`[HookError: [Inquirer] Hook functions can only be called from within a prompt]`,
);
expect(() => {
useKeypress(() => {});
Expand Down
2 changes: 1 addition & 1 deletion packages/select/select.test.mts
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ describe('select prompt', () => {
});

await expect(answer).rejects.toThrowErrorMatchingInlineSnapshot(
`[Error: [select prompt] No selectable choices. All choices are disabled.]`,
`[ValidationError: [select prompt] No selectable choices. All choices are disabled.]`,
);
await expect(answer).rejects.toBeInstanceOf(ValidationError);
});
Expand Down

0 comments on commit 8818c91

Please sign in to comment.