Skip to content

Commit

Permalink
..
Browse files Browse the repository at this point in the history
  • Loading branch information
Uzlopak committed Aug 30, 2024
1 parent 9f7cb3d commit a2d8ee9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
5 changes: 3 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ function getTransformStream(options = {}) {
return;
}

withScope(function (scope) {
withScope((scope) => {
scope.setLevel(data.level === 50 ? "error" : "fatal");

if (data.event) {
Expand Down Expand Up @@ -150,5 +150,6 @@ function toSentryError(data) {
return error;
}

module.exports = { getTransformStream };
module.exports = getTransformStream;
module.exports.default = module.exports;
module.exports.getTransformStream = getTransformStream;
7 changes: 3 additions & 4 deletions test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,15 @@ test("API", (t) => {
function event(payload) {
const error = new Error("Hello from the test");
error.level = 50;
error.event = {
payload: Object.assign(
Object.assign(
error,
{
installation: {
id: "456",
},
},
payload,
),
};
);
return error;
}

Expand Down

0 comments on commit a2d8ee9

Please sign in to comment.