Skip to content
This repository has been archived by the owner on Jun 21, 2023. It is now read-only.

Commit

Permalink
馃敟 Remove version info from Sentry test snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
Michal Vlas谩k committed Jun 15, 2020
1 parent ee76e59 commit cae1000
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/tests/sentry-mocked.test.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import omit = require('omit-deep');
import { levels } from '../levels';

let loggerFactory;
const scope: any = {};
const withScope = jest.fn(fn =>
const withScope = jest.fn((fn) =>
fn({
setContext: (key: string, val: any) => {
scope.context = { [key]: val };
Expand All @@ -16,7 +17,7 @@ const withScope = jest.fn(fn =>
})
);

const createCapture = (cb = () => {}) => data => {
const createCapture = (cb = () => {}) => (data) => {
cb();
return { data, scope };
};
Expand Down Expand Up @@ -86,12 +87,12 @@ describe('sentry mocked', () => {
"fatal",
]
`);
expect(captureMessage.mock.results[0].value).toMatchInlineSnapshot(`
expect(captureMessage.mock.results[0].value.scope.extras['cosmas.pkgVersion']).toBeDefined();
expect(omit(captureMessage.mock.results[0].value, 'cosmas.pkgVersion')).toMatchInlineSnapshot(`
Object {
"data": "fatal",
"scope": Object {
"extras": Object {
"cosmas.pkgVersion": "2.0.0-rc.2",
"level": 60,
"message": "fatal",
"severity": "CRITICAL",
Expand Down

0 comments on commit cae1000

Please sign in to comment.