-
-
Notifications
You must be signed in to change notification settings - Fork 422
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(package): Update cosmiconfig to version 5.0.2 (#444)
* fix(package): update cosmiconfig to version 5.0.2 * chore(package): update lockfile * fix: Migrate to cosmiconfig v5 Closes #441
- Loading branch information
1 parent
ec4f4f2
commit 2fc7aa3
Showing
5 changed files
with
22 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,7 @@ | ||
const actual = require.requireActual('cosmiconfig') | ||
const mock = jest.genMockFromModule('cosmiconfig') | ||
|
||
function cosmiconfig(name, options) { | ||
if (options.configPath) { | ||
return actual(name, options) | ||
} | ||
|
||
return mock(name, options) | ||
return actual(name, options) | ||
} | ||
|
||
module.exports = jest.fn(cosmiconfig) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters