Skip to content
This repository has been archived by the owner on Jan 5, 2019. It is now read-only.

Commit

Permalink
Update for more modern raven
Browse files Browse the repository at this point in the history
  • Loading branch information
imbstack committed Dec 15, 2018
1 parent 8af55ee commit 027c76f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/base.js
Expand Up @@ -33,7 +33,7 @@ class TimeKeeper {
const d = process.hrtime(this.start);
this.monitor.measure(this.name, d[0] * 1000 + d[1] / 1000000);
}
};
}

class BaseMonitor {
constructor() {
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Expand Up @@ -185,7 +185,7 @@ async function monitor(options) {
}

return m;
};
}

// ensure that only one SIGTERM handler is registered at any time
let _sigtermHandler = null;
Expand Down
6 changes: 3 additions & 3 deletions test/mockmonitor_test.js
Expand Up @@ -75,7 +75,7 @@ suite('MockMonitor', () => {

test('monitor.timer(k, value)', async () => {
const v = monitor.timer('k', 45);
assert(v == 45);
assert(v === 45);
// Sleep so that the promise handler can be handled before we check that
// something was recorded...
await new Promise(accept => setTimeout(accept, 10));
Expand All @@ -84,7 +84,7 @@ suite('MockMonitor', () => {

test('monitor.timer(k, () => value)', async () => {
const v = monitor.timer('k', () => 45);
assert(v == 45);
assert(v === 45);
await new Promise(accept => setTimeout(accept, 10));
assert(monitor.measures['mm.k'].length === 1);
});
Expand All @@ -94,7 +94,7 @@ suite('MockMonitor', () => {
await new Promise(accept => setTimeout(accept, 100));
return 45;
});
assert(v == 45);
assert(v === 45);
await new Promise(accept => setTimeout(accept, 10));
assert(monitor.measures['mm.k'].length === 1);
});
Expand Down
2 changes: 1 addition & 1 deletion test/uncaught_test.js
Expand Up @@ -115,7 +115,7 @@ suite('Uncaught Errors', () => {
'Error: This should bubble up to the top',
].join('\n')
));
assert(_.endsWith(output, 'Failed to report error to Sentry after timeout!\n'));
assert(output.indexOf('failed to send exception to sentry: socket hang up') !== -1);
done();
} catch (e) {
done(e);
Expand Down

0 comments on commit 027c76f

Please sign in to comment.