-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Conditional mocking (#127) * feat: conditional mocking and other enhancements * Add conditional mocking functionality * Add response functions returning string support * Add enableMocks and disableMocks functions * Add optional response function input and init arguments * feat(types): add PR#114 changes * doc(README): fix confusing documentation on conditional mocking * test: correct timeout test * feat: add do/dont mock and add only/never "If" suffix * test: add complex test examples * fix: incorporate changes from review to "once" * fix: type linter errors * Change implementation to use options object * Revert changes for once * Revert readme changes * Remove error log * Cleanup after refactor * Add abort mocking and simplified typescript * Updating readme with changes from API * Cleanup and dependency update Updated all deps to their most recent supported versions. The TypeScript version of the index.d.ts file needed to be updated from 2.3 to 3.0 because Jest 23.x and higher requires TypeScript 3.0. Lowering the Jest version to 22.x (which supports typescript 2.3), causes a Type incompatibility because of a change in the jest.MockInstance generic argument definition. Raising the Jest version to 24.x causes errors as it requires TypeScript 3.1 and higher. Removed the .babelrc file and all babel related dependencies. Babel was only being used for a small amount of ES6 syntax used in the test cases and was complicating maintenance of the dependencies (and greatly increasing the amount of dependencies downloaded). Removal only required 4 lines be changed in the tests. Changed scripts to use yarn instead of npm run. Fix error in abort script * Removing .idea files * Incorporate abort branch * Removing IntelliJ files
- Loading branch information
Showing
13 changed files
with
1,705 additions
and
4,420 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ node_modules | |
npm-debug.log | ||
yarn-error.log | ||
coverage | ||
.idea |
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 @@ | ||
types/test.ts |
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
Oops, something went wrong.