From 5b9c7f36ab17f259c9d858e6b61b9be98e29ccec Mon Sep 17 00:00:00 2001 From: Kirill Efimov Date: Wed, 10 Apr 2024 17:08:37 +0300 Subject: [PATCH] feat(test): add `CommonHelpers.isV3` unit tests --- test/helpers/common.test.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/helpers/common.test.js b/test/helpers/common.test.js index b1ebfa490..e66f2d4cb 100644 --- a/test/helpers/common.test.js +++ b/test/helpers/common.test.js @@ -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', () => { @@ -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); + }); + }); }); });