Make loadPartialConfig's options optional (#12200)

This commit is contained in:
Nicolò Ribaudo
2020-10-16 15:46:49 +02:00
committed by GitHub
parent 47250ffa65
commit 31396b286d
2 changed files with 19 additions and 2 deletions

View File

@@ -1330,6 +1330,17 @@ describe("buildConfigChain", function () {
]),
});
});
it("loadPartialConfig can be called with no arguments", () => {
const cwd = process.cwd();
try {
process.chdir(fixture("config-files", "babelrc-extended"));
expect(() => babel.loadPartialConfig()).not.toThrow();
} finally {
process.chdir(cwd);
}
});
});
it("should throw when `test` presents but `filename` is not passed", () => {