Skip to content

Commit 8a0123e

Browse files
committed
add test
1 parent 77476b7 commit 8a0123e

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/actions/getAnswersFromUser.test.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,4 +82,14 @@ describe('getAnswersFromUser()', () => {
8282
expect(answers.three).toBe(expected);
8383
expect(password).toHaveBeenCalledTimes(1);
8484
});
85+
86+
test('throws on unknown question type', async () => {
87+
const input = {
88+
questions: {
89+
one: { type: 'NOT FOUND', message: 'hi' },
90+
},
91+
};
92+
93+
await expect(async () => getAnswersFromUser(input)).rejects.toThrow();
94+
});
8595
});

0 commit comments

Comments
 (0)