Skip to content

Commit

Permalink
Fix: test regression
Browse files Browse the repository at this point in the history
  • Loading branch information
gabidobo committed Aug 18, 2022
1 parent 8df8668 commit dd43af9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,12 @@ const init = async ({
`Sandworm: access denied (${module} called ${family.name}.${method.name})`,
);
}
// eslint-disable-next-line no-restricted-syntax
for (const prop in method.original) {
if (Object.prototype.hasOwnProperty.call(method.original, prop)) {
replacement[prop] = method.original[prop];
}
}
replacement.prototype = method.original.prototype;
// eslint-disable-next-line no-param-reassign
family.originalRoot()[method.name] = replacement;
Expand Down
1 change: 0 additions & 1 deletion src/library/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -912,7 +912,6 @@ const library = () =>
},
{
name: 'Socket',
isConstructor: true,
description: 'Create a new TCP socket',
url: 'https://nodejs.org/api/net.html#class-netsocket',
},
Expand Down

0 comments on commit dd43af9

Please sign in to comment.