forked from exceptionless/Exceptionless.JavaScript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathExceptionlessClient-spec.ts
More file actions
24 lines (20 loc) · 995 Bytes
/
ExceptionlessClient-spec.ts
File metadata and controls
24 lines (20 loc) · 995 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import { ExceptionlessClient } from 'ExceptionlessClient';
describe('ExceptionlessClient', () => {
it('should use event reference ids', (done) => {
var error = new Error('From Unit Test');
var client = new ExceptionlessClient('LhhP1C9gijpSKCslHHCvwdSIz298twx271n1l6xw', 'http://localhost:50000');
expect(client.config.lastReferenceIdManager.getLast()).toBe(null);
client.submitException(error).then(
() => expect(client.config.lastReferenceIdManager.getLast()).toBe(null),
() => expect(client.config.lastReferenceIdManager.getLast()).toBe(null)
);
var numberOfPlugins = client.config.plugins.length;
client.config.useReferenceIds();
expect(client.config.plugins.length).toBe(numberOfPlugins + 1);
client.submitException(error)
.then(
() => expect(client.config.lastReferenceIdManager.getLast()).not.toBe(null),
() => expect(client.config.lastReferenceIdManager.getLast()).toBe(null))
.then(done);
}, 5000);
});