Skip to content

Commit 96250b6

Browse files
committed
Added test for string type release
1 parent 0fb047d commit 96250b6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

packages/hub/test/session.test.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,10 @@ describe('Session', () => {
1010
expect.objectContaining({ attrs: { release: JSON.stringify({ name: 'whatever' }) } }),
1111
);
1212
});
13+
test('Release of type string is not stringified in toJSON()', () => {
14+
const session = new Session({
15+
release: '1.0.x',
16+
});
17+
expect(session.toJSON()).toEqual(expect.objectContaining({ attrs: { release: '1.0.x' } }));
18+
});
1319
});

0 commit comments

Comments
 (0)