forked from jasmine/jasmine
-
Notifications
You must be signed in to change notification settings - Fork 0
add stub method to make it more clear if you just want to stub something #1
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
Open
dwt
wants to merge
96
commits into
e180ad83fd6d96781dba7a50c269401db00549c7
Choose a base branch
from
master
base: e180ad83fd6d96781dba7a50c269401db00549c7
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or 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
…aitsFor times out.
fixed html comments in SpecRunner.html example
…Also call the toString from prettyPrinter
…tolerate them if they exist so counts match even when using bad style
Merging after verifying locally that all specs are green (node, browser)
add linux support to ``rake spec:browser``
Remove double negative in docs (not.toNotContain, not.toNotEqual)
add license to gemspec so automated tools can pick it up
fix task list not displaying properly on github for contribute.markdown
fixing typo
It now calculates and compares a difference, rather than rounding two separate quantities and testing for their equality.
Change toBeCloseTo matcher to be more consistent
This stops it throwing errors in IE and other browsers. I think the newer Firefox and Chrome versions are the only browsers to not die when running it.
Wrapped the reserved word, "for", in quotes.
Guarantee that afterEach and after blocks are always run
Don't assume exports is defined when window is undefined
update jsdoc for jasmine.Matchers.prototype.toThrow
create downloads dir if needed during build_standalone_distribution
Fix swapped template values in build_standalone_runner.rb.
code completion in Spket IDE
JSDoc @return-tag to 'spyOn' and 'expect' functions
Added toBeNaN matcher
spec that to spy on an undefined method throws exception
less confusing messages for toHaveBeenCalledWith
…cts were not properly compared resulting in non-matching RegExp objects to always return true. a patch to jasmine.Env.equals_ adds an extra step for RexExp objects to be compared.
…accepted by the ES6. Note that the tests for this case are checking for the support of the sticky parameter. the logic is still tested by the other expect statements in browsers that do not support sticky but will never enter that block as creating a regExp with that flag is not allowed. Coverage is still good. See jasmine#234
comparison for regExp that compares pattern and modifiers
When making assertions about complex objects, Jasmine's failure message are sometimes gigantic and difficult to read because the string representation of an object contains all of the methods and properties in its prototype chain. This commit causes the pretty printer to only display on object's own properties.
Currently, jasmine's pretty printer traverses objects to 40 levels of nesting. If an object is more deeply nested than that, an exception is thrown. I find that after a few levels of nesting, the output becomes difficult to read. The process of serializing such deep objects also sometimes crashes the browser or causes a 'slow script' warning. This commit exposes a 'MAX_PRETTY_PRINT_DEPTH' option. It also causes the pretty printer to skip over parts of an object that are nested to deeply by simply printing out 'Object' or 'Array', rather than throwing an exception.
smaller, more configurable pretty-printing of objects
- Allow users to set the pretty-printer's recursion depth - When pretty-printing objects, don't include inherited properties. - Change toBeCloseTo matcher to be more consistent - Added toBeNaN matcher - Add checkbox to test runner which toggles catching of exceptions duri - Add config option which stops jasmine from capturing exceptions in a
… out as we're using for (reserved keyword) as object property name. Fix is just to quote the name which allows IE6/7/8 to run the tests. I think this might also fix Issue jasmine#303 on main repo (jasmine#303)
- Use public github url
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
functionally it's just spyOn, with the one added feature that it doesn't care if the stubbed method is already there.
The idea is that this way you can express explicitly in the code that you are stubbing something out, so the reader doesn't have to figure that out by himself.