-
-
Notifications
You must be signed in to change notification settings - Fork 597
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4275fd5
commit 70bf934
Showing
8 changed files
with
4,555 additions
and
36,437 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
entry: "hey" | ||
}; |
17 changes: 17 additions & 0 deletions
17
test/binCases/errors/v5-schema-validation/validation.test.js
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
"use strict"; | ||
|
||
const validation = require("../../../../bin/utils/validate-options"); | ||
const { run } = require("../../../testUtils"); | ||
|
||
test("validation", () => { | ||
const mockExit = jest.spyOn(process, "exit").mockImplementation(() => {}); | ||
validation(null); | ||
expect(mockExit).toHaveBeenCalledWith(-1); | ||
mockExit.mockRestore(); | ||
}); | ||
|
||
test("validation-success", () => { | ||
const { stdout, code } = run(__dirname, ["--config", "./options.js"]); | ||
expect(stdout).toContain("Can't resolve 'hey'"); | ||
expect(code).toBe(2); | ||
}); |