Skip to content

Commit eb48fc8

Browse files
revert: test changes
1 parent 9b7fee0 commit eb48fc8

File tree

3 files changed

+6
-11
lines changed

3 files changed

+6
-11
lines changed

jest.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ module.exports = {
22
"transform": {
33
"^.+\\.(ts|tsx|js|jsx)$": "ts-jest",
44
},
5-
"testRegex": "(/tests/.*|(\\.|/)(test|spec|tests))\\.(tsx?|js)$",
5+
"testRegex": "(/tests/.*|(\\.|/)(test|spec))\\.tsx?$",
66
moduleNameMapper: {
77
// Force module uuid to resolve with the CJS entry point, because Jest does not support package.json.exports. See https://github.com/uuidjs/uuid/issues/451
88
"uuid": require.resolve('uuid'),

lib/index.browser.tests.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -816,8 +816,7 @@ describe('javascript-sdk (Browser)', function() {
816816
sinon.assert.called(fakeEventManager.sendEvent);
817817
});
818818

819-
// TODO: unskip and correct failing test. Need this reference implementation for other work [FSSDK-10711]
820-
it.skip('should augment odp events with user agent data if userAgentParser is provided', async () => {
819+
it('should augment odp events with user agent data if userAgentParser is provided', async () => {
821820
const userAgentParser = {
822821
parseUserAgentInfo() {
823822
return {
@@ -1059,8 +1058,7 @@ describe('javascript-sdk (Browser)', function() {
10591058
assert(client.odpManager.eventManager.batchSize, 1);
10601059
});
10611060

1062-
// TODO: unskip and correct failing test. Need this reference implementation for other work [FSSDK-10711]
1063-
it.skip('should send an odp event to the browser endpoint', async () => {
1061+
it('should send an odp event to the browser endpoint', async () => {
10641062
const odpConfig = new OdpConfig();
10651063

10661064
const apiManager = new BrowserOdpEventApiManager(mockRequestHandler, logger);
@@ -1117,8 +1115,7 @@ describe('javascript-sdk (Browser)', function() {
11171115
sinon.assert.notCalled(logger.error);
11181116
});
11191117

1120-
// TODO: unskip and correct failing test. Need this reference implementation for other work [FSSDK-10711]
1121-
it.skip('should send odp client_initialized on client instantiation', async () => {
1118+
it('should send odp client_initialized on client instantiation', async () => {
11221119
const odpConfig = new OdpConfig('key', 'host', 'pixel', []);
11231120
const apiManager = new BrowserOdpEventApiManager(mockRequestHandler, logger);
11241121
sinon.spy(apiManager, 'sendEvents');

lib/optimizely/index.tests.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4622,8 +4622,7 @@ describe('lib/optimizely', function() {
46224622
assert.deepEqual(user2.getUserId(), userId2);
46234623
});
46244624

4625-
// TODO: unskip and correct failing test. Need this reference implementation for other work [FSSDK-10711]
4626-
it.skip('should call the error handler for invalid user ID and return null', function() {
4625+
it('should call the error handler for invalid user ID and return null', function() {
46274626
assert.isNull(optlyInstance.createUserContext(1));
46284627
sinon.assert.calledOnce(errorHandler.handleError);
46294628
var errorMessage = errorHandler.handleError.lastCall.args[0].message;
@@ -4633,8 +4632,7 @@ describe('lib/optimizely', function() {
46334632
assert.strictEqual(logMessage, sprintf(ERROR_MESSAGES.INVALID_INPUT_FORMAT, 'OPTIMIZELY', 'user_id'));
46344633
});
46354634

4636-
// TODO: unskip and correct failing test. Need this reference implementation for other work [FSSDK-10711]
4637-
it.skip('should call the error handler for invalid attributes and return null', function() {
4635+
it('should call the error handler for invalid attributes and return null', function() {
46384636
assert.isNull(optlyInstance.createUserContext('user1', 'invalid_attributes'));
46394637
sinon.assert.calledOnce(errorHandler.handleError);
46404638
var errorMessage = errorHandler.handleError.lastCall.args[0].message;

0 commit comments

Comments
 (0)