diff --git a/lib/index.browser.tests.js b/lib/index.browser.tests.js index 0a6feb28b..12d6b9d8f 100644 --- a/lib/index.browser.tests.js +++ b/lib/index.browser.tests.js @@ -153,7 +153,7 @@ describe('javascript-sdk (Browser)', function() { }); assert.instanceOf(optlyInstance, Optimizely); - assert.equal(optlyInstance.clientVersion, '6.4.0'); + assert.equal(optlyInstance.clientVersion, packageJSON.version); }); it('should set the JavaScript client engine and version', function() { diff --git a/lib/index.node.tests.js b/lib/index.node.tests.js index 1b4b6f185..cb20ae9d1 100644 --- a/lib/index.node.tests.js +++ b/lib/index.node.tests.js @@ -18,6 +18,7 @@ import sinon from 'sinon'; import Optimizely from './optimizely'; import testData from './tests/test_data'; +import packageJSON from '../package.json'; import * as optimizelyFactory from './index.node'; import configValidator from './utils/config_validator'; import { getMockProjectConfigManager } from './tests/mock/mock_project_config_manager'; @@ -88,7 +89,7 @@ describe('optimizelyFactory', function() { }); assert.instanceOf(optlyInstance, Optimizely); - assert.equal(optlyInstance.clientVersion, '6.4.0'); + assert.equal(optlyInstance.clientVersion, packageJSON.version); }); // TODO: user will create and inject an event processor // these tests will be refactored accordingly diff --git a/lib/index.react_native.spec.ts b/lib/index.react_native.spec.ts index 20493ab11..d0f5bd19b 100644 --- a/lib/index.react_native.spec.ts +++ b/lib/index.react_native.spec.ts @@ -92,7 +92,7 @@ describe('javascript-sdk/react-native', () => { expect(optlyInstance).toBeInstanceOf(Optimizely); // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore - expect(optlyInstance.clientVersion).toEqual('6.4.0'); + expect(optlyInstance.clientVersion).toEqual(packageJSON.version); }); it('should set the React Native JS client engine and javascript SDK version', () => {