Skip to content

Commit

Permalink
test: remove clearing module cache - not required anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
rauno56 committed Jun 14, 2022
1 parent fd0ec87 commit 8c769b8
Showing 1 changed file with 0 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,27 +34,16 @@ const sleep = (time: number) =>
return setTimeout(resolve, time);
});

const INSTALLED_PLUGINS_PATH = path.join(
__dirname,
'instrumentation',
'node_modules'
);

describe('NodeTracerProvider', () => {
let provider: NodeTracerProvider;
let contextManager: ContextManager;
before(() => {
module.paths.push(INSTALLED_PLUGINS_PATH);
});

beforeEach(() => {
contextManager = new AsyncHooksContextManager();
context.setGlobalContextManager(contextManager.enable());
});

afterEach(() => {
// clear require cache
Object.keys(require.cache).forEach(key => delete require.cache[key]);
contextManager.disable();
context.disable();
});
Expand Down

0 comments on commit 8c769b8

Please sign in to comment.