-
-
Notifications
You must be signed in to change notification settings - Fork 269
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add mock API #698
Closed
Closed
Add mock API #698
Commits on Oct 15, 2020
-
Initial tap.mock implementation
Building from the work started by @nlf ref: https://gist.github.com/nlf/52ca6adab49e5b3939ba37c7f0fc51c6 Co-authored-by: nlf <quitlahok@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 8e19ff2 - Browse repository at this point
Copy the full SHA 8e19ff2View commit details
Commits on Oct 16, 2020
-
- Added param checks and throws TypeErrors on unexpected usage - Simplified a bit some of the logic aroung builtin modules cache - Fixed some errors introduced while porting the original work from @nlf
Configuration menu - View commit details
-
Copy full SHA for 2a08514 - Browse repository at this point
Copy the full SHA 2a08514View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6b2570e - Browse repository at this point
Copy the full SHA 6b2570eView commit details -
Configuration menu - View commit details
-
Copy full SHA for c27ebea - Browse repository at this point
Copy the full SHA c27ebeaView commit details -
Configuration menu - View commit details
-
Copy full SHA for 55280ee - Browse repository at this point
Copy the full SHA 55280eeView commit details
Commits on Oct 18, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 7292ed4 - Browse repository at this point
Copy the full SHA 7292ed4View commit details
Commits on Oct 26, 2020
-
The mock keys should now be paths relative to the current script/tests that is defining it.
Configuration menu - View commit details
-
Copy full SHA for fff5b70 - Browse repository at this point
Copy the full SHA fff5b70View commit details -
Configuration menu - View commit details
-
Copy full SHA for d7e3007 - Browse repository at this point
Copy the full SHA d7e3007View commit details
Commits on Nov 12, 2020
-
Support immediately require calls
Add support to modules that instant executing a required module. require('./something')() This mock-fn-as-callback-style was used in test found in npm/cli: t.test('mock as callback style', t => { t.mock('../my-module.js', { '../sub-module.js': arg => { t.equal(arg, 'expected') t.end() } }) }) Also added more varied situations to stress test the module replacement, such as using t.mock within one of the defined mocks, require calls at execution time along with tests for the mock as callback style.
Configuration menu - View commit details
-
Copy full SHA for 51f45f5 - Browse repository at this point
Copy the full SHA 51f45f5View commit details
Commits on Dec 10, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 1857c5f - Browse repository at this point
Copy the full SHA 1857c5fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5c43286 - Browse repository at this point
Copy the full SHA 5c43286View commit details
Commits on Dec 11, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 513586b - Browse repository at this point
Copy the full SHA 513586bView commit details -
Configuration menu - View commit details
-
Copy full SHA for edee953 - Browse repository at this point
Copy the full SHA edee953View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3745cb2 - Browse repository at this point
Copy the full SHA 3745cb2View commit details
Commits on Dec 17, 2020
-
Configuration menu - View commit details
-
Copy full SHA for c196db8 - Browse repository at this point
Copy the full SHA c196db8View commit details -
Configuration menu - View commit details
-
Copy full SHA for e0cdfa7 - Browse repository at this point
Copy the full SHA e0cdfa7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7f6245c - Browse repository at this point
Copy the full SHA 7f6245cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5980b7b - Browse repository at this point
Copy the full SHA 5980b7bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6b040a9 - Browse repository at this point
Copy the full SHA 6b040a9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8af0892 - Browse repository at this point
Copy the full SHA 8af0892View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6c5cb81 - Browse repository at this point
Copy the full SHA 6c5cb81View commit details
Commits on Dec 18, 2020
-
Configuration menu - View commit details
-
Copy full SHA for a8c0d8d - Browse repository at this point
Copy the full SHA a8c0d8dView commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.