Skip to content

Commit

Permalink
feat(test): add CommonHelpers.isV3 unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
korifey91 committed Apr 11, 2024
1 parent 09da43e commit 2839be0
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/helpers/common.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ describe('CommonHelpers', () => {
expect(result).toEqual('subscribe');
});
});
describe('.isV3', () => {
test('should return "false" - in case v2 doc', () => {
const result = CommonHelpers.isV3(v2Doc);
expect(result).toBe(false);
});
});
});
describe('v3', () => {
describe('.getOperationType', () => {
Expand Down Expand Up @@ -70,5 +76,11 @@ describe('CommonHelpers', () => {
expect(result).toEqual('request');
});
});
describe('.isV3', () => {
test('should return "true" - in case v3 doc', () => {
const result = CommonHelpers.isV3(v3Doc);
expect(result).toBe(true);
});
});
});
});

0 comments on commit 2839be0

Please sign in to comment.