-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Expand & improve the testing module (#1149)
* Add a throwing test stub to the testing module * Improve Stubscape Update the Stubscape implementation so that the behavior of `quote` and `quoteAll` is more similar to the real implementation of Shescape. Tests are updated accordingly, mostly resulting in cleaner integration tests (with more coverage) at the minor cost of more specific unit tests (that actually more accurately reflect expected behavior). Also update the Stubscape JSDoc to be up-to-date, both with respect to the changes seen here as well as the changes of v3.0.0.
- Loading branch information
1 parent
3e99c28
commit 4f03fd8
Showing
8 changed files
with
195 additions
and
42 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
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/** | ||
* @overview Contains unit tests for the throwing test stub of shescape. | ||
* @license MIT | ||
*/ | ||
|
||
import { testProp } from "@fast-check/ava"; | ||
|
||
import { arbitrary } from "./_.js"; | ||
|
||
import { Throwscape } from "../../../testing.js"; | ||
|
||
testProp("throws", [arbitrary.shescapeOptions()], (t, options) => { | ||
t.throws(() => new Throwscape(options), { | ||
instanceOf: Error, | ||
message: "Can't be instantiated", | ||
}); | ||
}); |
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
Oops, something went wrong.