mirror of
https://github.com/Telecominfraproject/ols-ucentral-schema.git
synced 2025-10-30 01:32:26 +00:00
tests: mocklib: prevent caching modules loaded by mocklib.require()
This is needed to ensure that subsequent wrapped require() calls (re)load the mock modules instead of reusing the cached real module instances. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
committed by
John Crispin
parent
184226532d
commit
2fb97d5436
@@ -179,6 +179,7 @@ global.mocklib = {
|
||||
|
||||
try {
|
||||
res = require(module);
|
||||
delete global.modules[module];
|
||||
}
|
||||
catch (e) {
|
||||
ex = e;
|
||||
|
||||
Reference in New Issue
Block a user