Skip to content

Commit 06d81f2

Browse files
committed
Create a real exception in the reference id test
1 parent 09cd805 commit 06d81f2

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/ExceptionlessClient-spec.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ describe('ExceptionlessClient', () => {
1515
});
1616

1717
it('should use event reference ids', (done) => {
18-
let error = new Error('From Unit Test');
18+
let error = createException();
1919

2020
let client = new ExceptionlessClient('LhhP1C9gijpSKCslHHCvwdSIz298twx271n1l6xw', 'http://localhost:50000');
2121
expect(client.config.lastReferenceIdManager.getLast()).to.be.null;
@@ -82,4 +82,15 @@ describe('ExceptionlessClient', () => {
8282
expect(client.config.apiKey).to.equal('LhhP1C9gijpSKCslHHCvwdSIz298twx271n1l6xw');
8383
expect(client.config.serverUrl).to.equal('http://localhost:50000');
8484
});
85+
86+
function createException() {
87+
function throwError() {
88+
throw new ReferenceError('This is a test');
89+
}
90+
try {
91+
throwError();
92+
} catch (e) {
93+
return e;
94+
}
95+
}
8596
});

0 commit comments

Comments
 (0)