mikemoraned
33e4f5efbe
Allow users to set the maximum length of array that the pretty-printer
...
will print out.
Currently, jasmine's pretty printer will iterate over an entire array,
formatting every element recursively. For very large arrays, this can
crash the page, or cause a 'slow script' warning.
This commit exposes a 'MAX_PRETTY_PRINT_ARRAY_LENGTH' option. If an
array larger than this is encountered, recursion will stop and the
array length will be printed instead e.g. "Array[20000000]".
The 'MAX_PRETTY_PRINT_ARRAY_LENGTH' option defaults to 100. This is
length of array will not kill your browser, but will allow you
to see big arrays, if you can stomach the output.
2014-03-12 12:16:01 -07:00
Greg Cobb and Luan Santos
367d3dcf66
Rebuild distribution
2014-03-12 11:51:49 -07:00
Greg Cobb and Luan Santos
3e739e4bc9
Create jasmine-core python egg
2014-03-11 13:40:28 -07:00
Greg Cobb and Luan Santos
ba6f99423f
Add jasmine logo image to html runner
...
[#3984585 ]
2014-03-10 17:16:31 -07:00
Christopher Amavisca, Greg Cobb and Luan Santos
3a5672cd33
Show message if no specs are found in console reporter
...
[#12784235 ]
2014-03-10 12:00:49 -07:00
Christopher Amavisca, Greg Cobb and Luan Santos
af4cc76e2a
Show message if no specs are found
...
[#12784235 ]
2014-03-10 11:23:27 -07:00
Christopher Amavisca, Greg Cobb and Luan Santos
1922514f2d
Specs without expectations should be alerted to the user
...
- Add console.error to the HtmlReporter when there is a spec without any expectation
- Change the spec's link text and color to include a warning
- Create a status for specs to label them as "empty"
- console is not accessible to IE unless you have developer tools open,
so protect against that by mocking console.
[#59424794 ]
2014-03-10 11:19:07 -07:00
slackersoft
71dbffeaef
Merge branch 'recursive-containing' of https://github.com/cbandy/jasmine into cbandy-recursive-containing
2014-03-05 21:01:34 -08:00
slackersoft
d7053612f5
Build distribution to include MockDate
...
- Forgot to do this when merging the pull request
- Also fix quotes for string to match jshint rules
2014-03-01 13:18:15 -08:00
Greg Cobb and Sheel Choksi
640f94a1bd
Don't allow calling the same done callback multiple times
...
[finishes #62585700 ][fixes #523 ]
2014-02-25 18:06:30 -08:00
Greg Cobb and Sheel Choksi
5aac3e3292
Refactor Spec and QueueRunner [ #62585700 ]
...
- QueueRunner now responsible for timing out async specs instead of
Spec
- Make sure only spec functions are timeoutable and not suites (due to
the refactor)
2014-02-25 18:06:30 -08:00
Robin Böhm
31d71ac22f
add single quote check to jshint and fix src files for that
...
[fixes #522 ]
2014-02-24 16:28:16 -08:00
Greg Cobb and Sheel Choksi
98c258a659
Bump built distribution [ #503 ][finishes #66350898 ]
2014-02-24 15:47:34 -08:00
Sheel Choksi
76ca5ef6d4
Allow matcher custom failure messages to be a function
...
By deferring the evaluation of these messages, we can avoid the
expensive creation of them when in the majority use case (tests are
passing) they are not needed.
These failure messages were causing performance problems with larger
objects needed to be pretty printed as discussed in #520 and brought up
by @rdy.
[fixes #65925900 ][fixes #520 ]
2014-02-18 20:05:30 -08:00
Sheel Choksi
a8cbef3123
More color blind friendly CSS from @dleppik
...
Updating the passing and failing colors in HTML reporter to
help red/green color blind users using the colors suggested by @dleppik
Console reporter still likely needs similar changes but there's less
options there
[#463 , #509 , finishes #60613086 ]
2014-02-16 14:56:18 -08:00
Sheel Choksi
7cf899a4ea
Special case printing -0
...
Use the 1/x trick to determine if a value is -0 and special case the
printing of it.
[closes #496 ]
2014-02-09 14:14:33 -08:00
Sheel Choksi
83c0ea7f91
Fix error message in jasmine.any
...
The expected any 'class' was not being included in the error message
due to accessing the wrong property
2014-02-09 14:06:47 -08:00
tcorral
b5775aec4f
Allow stub or spy Date object safely using a closure to get a clean copy
...
[closes #506 ]
2014-02-09 12:20:03 -08:00
slackersoft
2a8b5a30b6
Use \d7 instead of plain 'x' for more square appearance
...
[finishes #48434179 ]
2014-01-18 17:33:57 -10:00
slackersoft
15aa3ecb5d
Better support in pretty printer when an object has null prototype
...
- Fixes #500
2014-01-17 19:56:43 -10:00
Sheel Choksi
c8ffa6000b
Reproducing change made in #479 that was made to build distribution instead of src
...
It was lost when I rebuilt the distribution
2014-01-09 22:14:04 -08:00
Sheel Choksi
06a553503d
Better failure message when something is thrown that's not an error
...
Change from 'undefined : undefined' to '<thing that was thrown> thrown'
Pointed out by @charleshansen
2014-01-09 22:10:40 -08:00
Sheel Choksi
aab4808410
Bump built distribution
2014-01-09 22:07:59 -08:00
Sheel Choksi
b525313cdb
Make the check for pending spec exception work for values that don't have toString
2014-01-04 23:11:20 -08:00
Sheel Choksi
f576395620
Bump built distribution copyright's for 2014
2014-01-04 23:11:20 -08:00
shprink
4f4ae086aa
force query selector to seek within the html-reporter element
2013-12-19 10:19:02 +01:00
Christopher Jobst and Sheel Choksi
a2a8b5dde2
Create a 2.0 distribution
2013-12-16 12:33:34 -08:00
Sheel Choksi
6bc87ad223
Merge pull request #466 from
...
maciej-filip-sz:DelayedFunctionScheduler-patch
Sets and executes timeouts set during a tick.
2013-11-17 17:17:31 -08:00
Sheel Choksi
8a6d7828c6
Make all async functions be subject to the timeout
...
[finishes #60798058 ]
2013-11-14 23:01:43 -08:00
Sheel Choksi
c888b0c1b8
Slight refactoring of clearing timeouts when an exception is thrown
2013-11-14 20:48:28 -08:00
Sheel Choksi
72e9851217
Bumping built distribution
2013-11-14 18:16:32 -08:00
Rajan Agaskar and Sheel Choksi
a2debf60b6
Use jasmine.addMatchers instead of reaching through jasmine.Expectation [finishes #59518946 ]
2013-10-29 18:35:17 -07:00
Sheel Choksi
8585ef69a5
Update clock not installed message to reflect current boot installation process
2013-10-29 17:33:51 -07:00
Sheel Choksi
cb5aea1fcf
Fix builds by working around browser timing functions not being successfully overridden
2013-10-29 17:32:04 -07:00
Sheel Choksi
40e3020fdc
Build distribution for 2.0.0-rc5 and associated standalone distribution
2013-10-29 14:03:02 -07:00
Sheel Choksi
a03fad8911
Move built console.js into lib and include in standalone distribution
...
[finishes #59679110 ]
2013-10-29 14:03:01 -07:00
Sheel Choksi
a3424ea265
Remove addCustomEqualityTester and addMatchers from global
...
These functions are available on the jasmine namespace
2013-10-24 14:00:05 -07:00
Sheel Choksi
d06da150de
Stop passing in queryString to HTMLReporter, it is unused
2013-10-23 11:06:42 -07:00
Davis W. Frank
5aaafed4d8
Move clock from global to jasmine; provide a function to access the clock.
2013-10-10 16:24:58 -07:00
Davis W. Frank
c28c124f58
removed addMatchers from the global. This should have been in previous commit
2013-10-10 14:11:44 -07:00
Davis W. Frank
f0a1adb61c
Continuing boot change with docs
2013-10-10 12:00:46 -07:00
Davis W. Frank
5ff2aecab8
Moving a documented-up boot.js from the website back into core
2013-10-10 11:59:59 -07:00
Davis W. Frank
8ca8197b4c
Make exposure of addMatchers and addCustomEqualityTesters be on jasmine instead of inconsistent.
2013-10-10 11:32:21 -07:00
slackersoft
6641d64305
Make addCustomEqualityTester available on jasmine global
...
- User shouldn't have to `jasmine.getEnv()` to add one
[#54582648 ]
2013-10-06 11:32:38 -07:00
slackersoft
7c1fcd7bb5
Regenerate jasmine.js for QueueRunner fix
2013-10-06 11:32:19 -07:00
slackersoft
e91d0341a4
Revert "Make addCustomEqualityTester available on jasmine global"
...
Oops, this made it on global object, not `jasmnie`
This reverts commit 144ff174f6 .
2013-10-06 11:11:46 -07:00
slackersoft
144ff174f6
Make addCustomEqualityTester available on jasmine global
...
- User shouldn't have to `jasmine.getEnv()` to add one
2013-10-06 11:05:35 -07:00
Gregg Van Hove and Tim Jarratt
749c15fe07
Bump version to rc3 in jasmine.js
2013-10-03 15:28:26 -07:00
Gregg Van Hove and Tim Jarratt
7e071547f5
Custom matchers fail to behave as expected
...
If they return false, that should be respected.
Submitted via @tjgrathwell
[Finish #58184156 ]
close #434
2013-10-03 15:13:27 -07:00
Gregg Van Hove and Tim Jarratt
18e1ab93ea
Release for rc3
2013-10-03 09:55:36 -07:00