Skip to content

Commit

Permalink
Revert unnecessary changes
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew W. Harn <[email protected]>
  • Loading branch information
awharn committed Nov 8, 2023
1 parent 6563b4a commit e1c1d2c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
6 changes: 1 addition & 5 deletions __tests__/beforeTests.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,4 @@ process.env.CLI_TEST_UTILS_USE_PROJECT_ROOT_DIR = true;
beforeAll(() => {
// If the worker runs out of memory, this needs to be reset
require('events').EventEmitter.defaultMaxListeners = Infinity;
});

afterAll(() => {
jest.restoreAllMocks();
})
});
1 change: 1 addition & 0 deletions packages/imperative/__tests__/src/TestUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -472,5 +472,6 @@ export async function setupConfigToLoad(properties?: IConfig, opts: IConfigOpts

const fakeConfig = await Config.load("fakeapp", opts);
jest.spyOn(ImperativeConfig.instance, "config", "get").mockReturnValue(fakeConfig);

tempMocks.forEach(mock => mock.mockRestore()); // Reset all mocks
}
4 changes: 2 additions & 2 deletions packages/imperative/src/utilities/src/ImperativeConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -283,11 +283,11 @@ export class ImperativeConfig {
try {
return require(file);
} catch (e) {
const message = "Could not locate the specified module through requiring directly, nor through " +
e.message = "Could not locate the specified module through requiring directly, nor through " +
"searching the directories above " + ImperativeConfig.instance.callerLocation +
". 'require()' error message: " + e.message +
" \n 'find-up' (directory search) error message:" + findupErr.message;
throw new ImperativeError({msg: message, causeErrors: [e, findupErr]});
throw new ImperativeError({msg: e.message});
}
}

Expand Down

0 comments on commit e1c1d2c

Please sign in to comment.