Skip to content

Commit ae229ae

Browse files
committed
feat: missing answers test
1 parent 2fb1ac0 commit ae229ae

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

packages/builders/__tests__/messages/poll.test.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,12 @@ describe('Poll', () => {
110110
});
111111

112112
describe('Poll answers', () => {
113+
test('GIVEN a poll without answers THEN throws error', () => {
114+
const poll = new PollBuilder(dummyData);
115+
116+
expect(() => poll.toJSON()).toThrowError();
117+
});
118+
113119
test('GIVEN a poll with pre-defined answer THEN returns valid toJSON data', () => {
114120
const poll = new PollBuilder({
115121
...dummyData,

0 commit comments

Comments
 (0)