|
1 | 1 | /**
|
2 |
| - * Copyright 2016-2020, 2022-2023 Optimizely |
| 2 | + * Copyright 2016-2020, 2022-2024 Optimizely |
3 | 3 | *
|
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License");
|
5 | 5 | * you may not use this file except in compliance with the License.
|
|
13 | 13 | * See the License for the specific language governing permissions and
|
14 | 14 | * limitations under the License.
|
15 | 15 | */
|
| 16 | + |
16 | 17 | import logging, { getLogger } from './modules/logging/logger';
|
17 | 18 |
|
18 | 19 | import { assert } from 'chai';
|
@@ -67,7 +68,7 @@ if (!global.window) {
|
67 | 68 | }
|
68 | 69 | }
|
69 | 70 |
|
70 |
| -const pause = (timeoutMilliseconds) => { |
| 71 | +const pause = timeoutMilliseconds => { |
71 | 72 | return new Promise(resolve => setTimeout(resolve, timeoutMilliseconds));
|
72 | 73 | };
|
73 | 74 |
|
@@ -846,19 +847,19 @@ describe('javascript-sdk (Browser)', function() {
|
846 | 847 | const userAgentParser = {
|
847 | 848 | parseUserAgentInfo() {
|
848 | 849 | return {
|
849 |
| - os: { 'name': 'windows', 'version': '11' }, |
850 |
| - device: { 'type': 'laptop', 'model': 'thinkpad' }, |
851 |
| - } |
852 |
| - } |
853 |
| - } |
| 850 | + os: { name: 'windows', version: '11' }, |
| 851 | + device: { type: 'laptop', model: 'thinkpad' }, |
| 852 | + }; |
| 853 | + }, |
| 854 | + }; |
854 | 855 |
|
855 | 856 | const fakeRequestHandler = {
|
856 |
| - makeRequest: sinon.spy(function (requestUrl, headers, method, data) { |
| 857 | + makeRequest: sinon.spy(function(requestUrl, headers, method, data) { |
857 | 858 | return {
|
858 | 859 | abort: () => {},
|
859 | 860 | responsePromise: Promise.resolve({ statusCode: 200 }),
|
860 |
| - } |
861 |
| - }) |
| 861 | + }; |
| 862 | + }), |
862 | 863 | };
|
863 | 864 |
|
864 | 865 | const client = optimizelyFactory.createInstance({
|
@@ -1050,7 +1051,6 @@ describe('javascript-sdk (Browser)', function() {
|
1050 | 1051 |
|
1051 | 1052 | client.sendOdpEvent(ODP_EVENT_ACTION.INITIALIZED);
|
1052 | 1053 |
|
1053 |
| - sinon.assert.calledWith(logger.error, 'ODP event send failed.'); |
1054 | 1054 | sinon.assert.calledWith(logger.log, optimizelyFactory.enums.LOG_LEVEL.INFO, 'ODP Disabled.');
|
1055 | 1055 | });
|
1056 | 1056 |
|
|
0 commit comments