Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
beforeEach(() => {
jest.resetModules();
mockedFetch.resetMocks();
global.console = {
...global.console,
log: consoleLogMock
}
global.process = {
...global.process,
exit: processExitMock
};
mockedChildProcess = require('child_process');
require('../../lib/utilities/config-manager').init();
consoleData = '';
});
beforeEach(() => {
jest.resetModules();
mockedFetch.resetMocks();
global.console = {
...global.console,
log: consoleLogMock
}
global.process = {
...global.process,
exit: processExitMock
};
mockedChildProcess = require('child_process');
require('../../lib/utilities/config-manager').init();
consoleData = '';
});
beforeEach(() => {
jest.resetModules();
mockedFetch.resetMocks();
global.console = {
...global.console,
log: consoleLogMock
}
global.process = {
...global.process,
exit: processExitMock
};
mockedChildProcess = require('child_process');
require('../../lib/utilities/config-manager').init();
consoleData = '';
});
beforeEach(() => {
jest.resetModules();
mockedFetch.resetMocks();
global.console = {
...global.console,
log: consoleLogMock
}
global.process = {
...global.process,
exit: processExitMock
};
mockedChildProcess = require('child_process');
require('../../lib/utilities/config-manager').init();
consoleData = '';
});
beforeEach(() => {
jest.resetModules();
mockedFetch.resetMocks();
global.console = {
...global.console,
log: consoleLogMock
}
global.process = {
...global.process,
exit: processExitMock
};
mockedChildProcess = require('child_process');
require('../../lib/utilities/config-manager').init();
consoleData = '';
});
beforeEach(() => {
fetch.resetMocks();
});
beforeEach(() => {
fetch.resetMocks();
fetch.mockResponseOnce(JSON.stringify(sampleResponse));
});
beforeEach(() => {
fetch.resetMocks();
});
beforeEach(() => {
fetch.resetMocks();
next.mockClear();
});
afterEach(() => {
cleanup()
fetchMock.resetMocks()
})