Remove babel-plugin-rewire (#3522)

This commit is contained in:
Louis Lam 2023-08-04 01:10:15 +08:00 committed by GitHub
parent f4967615c0
commit d231a05526
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 19 additions and 21 deletions

View file

@ -1047,3 +1047,13 @@ module.exports.grpcQuery = async (options) => {
});
};
// For unit test, export functions
if (process.env.TEST_BACKEND) {
module.exports.__test = {
parseCertificateInfo,
};
module.exports.__getPrivateFunction = (functionName) => {
return module.exports.__test[functionName];
};
}