Skip to content

Commit a4ce237

Browse files
committed
Optimized some unit tests.
1 parent 05efca3 commit a4ce237

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

example/index.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,8 @@ function getNonexistentData() {
33
}
44

55
function sendEvents(numberToSends, eventType) {
6-
eventType = eventType || getRandomInt(0, 1);
7-
86
for (var index = 0; index < numberToSends; index++) {
9-
switch (eventType) {
7+
switch (eventType || getRandomInt(0, 1)) {
108
case 0: {
119
exceptionless.ExceptionlessClient.default.submitLog('sendEvents', 'This is a test message', 'info');
1210
break;

src/Utils-spec.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,9 @@ describe('Utils', () => {
7575
});
7676

7777
it.skip('deep circular reference', () => {
78-
let a:any = {};
79-
let b:any = {};
80-
let c:any = { d: 'test' };
78+
let a: any = {};
79+
let b: any = {};
80+
let c: any = { d: 'test' };
8181

8282
a.b = b;
8383
b.c = c;

src/plugins/EventPluginManager-spec.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ describe('EventPluginManager', () => {
2323
if (next) {
2424
next();
2525
}
26-
}, 100);
26+
}, 25);
2727
});
2828

2929
client.config.addPlugin('2', 2, (ctx: EventPluginContext, next?: () => void) => {
@@ -117,7 +117,7 @@ describe('EventPluginManager', () => {
117117
if (next) {
118118
next();
119119
}
120-
}, 500);
120+
}, 25);
121121
});
122122

123123
client.config.addPlugin('2', 2, () => {
@@ -141,7 +141,7 @@ describe('EventPluginManager', () => {
141141
}
142142

143143
client.config.addPlugin('1', 1, (ctx: EventPluginContext, next?: () => void) => {
144-
setTimeout(done, 100);
144+
setTimeout(done, 25);
145145
});
146146

147147
client.config.addPlugin('2', 2, () => {

0 commit comments

Comments
 (0)