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
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];
};
}