Commit graph

1463 commits

Author SHA1 Message Date
Keith Cirkel
3397ddaebf Merge pull request #1005 from meeber/skip-failing-tests
test: skip failing `.include` tests in IE11
2017-07-10 11:46:20 +01:00
Grant Snodgrass
11a6f8502f test: skip failing .include tests in IE11
Contrary to spec, IE11 uses SameValue instead of SameValueZero
equality for Sets.
2017-07-09 19:01:00 -04:00
v1adko
45cb32710a chai@4.1.0 2017-06-24 09:30:03 +03:00
Aleksey Shvayka
2eddd79002 Add ES6 collection support to include() (#994)
* fix error messages tests

* add tests

* add implementation

* performance tweaks

* add tests for SameValueZero

* drop weakmap support

* update docs
2017-06-23 15:35:07 -07:00
Vlad Kolbaya
3c932e21e6 feat: allow dates for isBelow and isAbove assertions (#990)
* Fixed most tests

* Fix date uniformity (UTC)

* Add comment

* Cleanup

* Change extra functions (WIP)

* Finished tests

* Add master chai.js back

* Uncomment failing tests

* Update master and tests

* Actual seconds, duh

* Refactor 'above'

* Update all methods

* More explicit error

* Documentation - articles consistency

* Custom message test in assert

* No parenthesis in should

* Custom message for isAbove
2017-06-23 12:54:23 +01:00
Grant Snodgrass
3bcb21cdeb Merge pull request #979 from chaijs/greenkeeper/browserify-14.4.0
Update browserify to the latest version 🚀
2017-06-22 15:42:04 -04:00
Keith Cirkel
5daceabe7d Merge pull request #988 from samlanning/missing-var
Add a missing var keyword found by lgtm.com
2017-06-19 10:50:41 +01:00
Keith Cirkel
9116bc8591 Merge pull request #993 from meeber/refactor-expect-types
refactor: `expectTypes` to access `ssfi` flag
2017-06-19 10:48:23 +01:00
Keith Cirkel
351e9689d3 Merge pull request #992 from meeber/property-target-type
fix: check target's type in `.property` assertion
2017-06-19 10:47:41 +01:00
Grant Snodgrass
e7b23846b4 refactor: expectTypes to access ssfi flag
The `ssfi` flag doesn't need to be passed to the `expectTypes`
util function because it can access it directly from the assertion
object.
2017-06-11 08:33:48 -04:00
Grant Snodgrass
e6ddf64c8f fix: check target's type in .property assertion
Previously, the `.property` assertion failed ungracefully if the target was `null` or `undefined`. This commit causes an `AssertionError` to be thrown instead so that the ssfi flag and custom error messages are respected.
2017-06-10 17:51:50 -04:00
Sam Lanning
7e466af33b Add a missing var keyword found by lgtm.com 2017-06-05 18:50:33 -07:00
Lucas Fernandes da Costa
616cf8bf88 Revert get version package json (#986)
* Revert getting version from package.json

* chai@4.0.2
2017-06-05 14:12:19 -03:00
Keith Cirkel
b38b8d7659 fix: (#978) remove browser field (#982)
This removes the browser field which was used incorrectly. It is not needed for chai, and bundlers should bundle the commonjs code instead.
2017-05-31 18:01:31 -03:00
greenkeeper[bot]
eba5b420f8 chore(package): update browserify to version 14.4.0 2017-05-29 08:54:42 +00:00
Anderson Aguiar
d0ace69b68 Update supported node version badge in README FIX #975 2017-05-27 11:41:29 -03:00
Keith Cirkel
ab1fbadcfe Merge pull request #973 from chaijs/chore-uncomment-travis-deploy
chore: uncomment travis lines
2017-05-26 10:58:22 +01:00
Keith Cirkel
545ca2f0a6 chore: uncomment travis lines
This allows us to release on tags, for the upcoming 4.0
2017-05-26 10:24:51 +01:00
Keith Cirkel
6349ff4731 Merge pull request #972 from lucasfcosta/release-4.0.0
Release chai@4.0.0
2017-05-26 10:15:26 +01:00
lucasfcosta
0fe98b14fe chai@4.0.0 2017-05-25 19:45:31 -03:00
Lucas Vieira
30a44513f4 Merge pull request #967 from lucasfcosta/remove-lib-bump
Remove bump command to change lib/chai.js
2017-05-09 22:08:23 -03:00
lucasfcosta
8ba95a7620 Remove bump command to change lib/chai.js 2017-05-09 19:44:30 -03:00
Keith Cirkel
0825826059 Merge pull request #964 from zetamorph/assert-nestedInclude-ownInclude
assert: add nestedInclude, deepNestedInclude, ownInclude and deepOwnInclude
2017-05-09 10:08:36 +01:00
Grant Snodgrass
f3adfd911e fix: PhantomJS 1.x incompatibility (#966) 2017-05-08 17:22:54 -03:00
Johannes Loewe
b744130df9 Assert: made documentation more descriptive
Assert: made documentation more descriptive
2017-05-07 14:49:42 +02:00
Johannes Loewe
33e4403671 test: added custom message test to negated .nested-, .deep-, .own.include 2017-05-05 00:55:34 +02:00
Johannes Loewe
4180242e83 test: added message argument to negated nested-, deep-, own- and deepOwnInclude 2017-05-05 00:54:11 +02:00
Johannes Loewe
40bb490060 assert interface: add .deepOwnInclude and notdeepOwnInclude 2017-05-05 00:54:11 +02:00
Johannes Loewe
97b6243431 assert interface: add .ownInclude and .notOwnInclude 2017-05-05 00:54:11 +02:00
Johannes Loewe
24d7fa3849 assert interface: add deepNestedInclude and notDeepNestedInclude 2017-05-05 00:54:11 +02:00
Johannes Loewe
7063b940a8 assert interface: add nestedInclude and notNestedInclude 2017-05-05 00:54:10 +02:00
Johannes Loewe
875057d8ea test: add assert.deepOwnInclude and assert.notDeepOwnInclude 2017-05-05 00:54:10 +02:00
Johannes Loewe
889b489fe9 test: add assert.deepNestedInclude and assert.notDeepNestedInclude 2017-05-05 00:54:10 +02:00
Johannes Loewe
a5691d32c5 test: add assert.ownInclude and assert.notOwnInclude 2017-05-05 00:54:10 +02:00
Johannes Loewe
479e4c46de test: add assert.nestedInclude and assert.notNestedInclude 2017-05-05 00:54:10 +02:00
Keith Cirkel
850bd7e016 Merge pull request #957 from keithamus/release/4.0.0-canary.2
chore: release 4.0.0-canary.2
2017-04-12 23:12:37 +01:00
Keith Cirkel
7db8c6ce28
chore: temporarily comment out deploy whlile we're canary 2017-04-12 10:31:30 +01:00
Keith Cirkel
4c2c3d8935
chore: release 4.0.0-canary.2 2017-04-11 21:22:32 +01:00
Keith Cirkel
526f88585d Merge pull request #920 from meeber/update-docs
Overhaul bdd documentation
2017-04-11 21:10:23 +01:00
Grant Snodgrass
f80d699a50 docs: overhaul bdd documentation 2017-04-08 21:41:45 -04:00
Grant Snodgrass
dce6415d0a style: rename target argument to subject
Most assertions use the term "target" to refer to the object under
test, but a few assertions also had a `target` argument, resulting in
an overloaded term that was difficult to document. This commit
renames every `target` argument to `subject`.
2017-04-08 09:23:27 -04:00
Keith Cirkel
a515ece48a Merge pull request #947 from meeber/fix-messages
fix: always honor custom message
2017-04-05 12:12:18 +01:00
Grant Snodgrass
7f8a268e52 fix: always honor custom message 2017-04-04 17:28:19 -04:00
Keith Cirkel
e5ac3b0874 Merge pull request #922 from meeber/remove-chai-frames
Remove implementation frames from stack trace
2017-04-04 22:22:13 +01:00
Grant Snodgrass
a253b4c50e docs: remove excessive comments from tests 2017-03-23 18:20:41 -04:00
Grant Snodgrass
8fad9c8000 refactor: rename keep_ssfi to lockSsfi 2017-03-23 18:20:41 -04:00
Grant Snodgrass
b584b94c24 fix: remove frames from assert interface stack
- Make it so that only `AssertionError` is thrown from inside of an
  assert interface wrapper function

- Always set `ssfi` to the current function when creating a new
  `AssertionError` inside of an assert interface wrapper function

- Always set `ssfi` to the current function when creating a new
  `Assertion` inside of an assert interface wrapper function,
  and set the `keep_ssfi` flag

- Improve the `globalErr` test helper function to also validate that the
  thrown error's stack trace doesn't contain frames from the assert
  interface
2017-03-23 18:20:41 -04:00
Grant Snodgrass
4b090100aa fix: remove frames from bdd interface stack
- Make it so that only `AssertionError` is thrown from inside of an
  assertion

- Always pass the current `ssfi` to a `new AssertionError` inside of an
  assertion

- Always pass the current `ssfi` to a new `Assertion` inside of an
  assertion, and set the `keep_ssfi` flag

- Improve the `globalErr` test helper function to also validate that
  the thrown error's stack trace doesn't contain implementation frames
2017-03-23 18:20:38 -04:00
Grant Snodgrass
cf84f95505 feat: improve keep_ssfi flag
- Allows the `keep_ssfi` flag to be set when creating new Assertion
  objects by providing its value as the fourth argument.

- Updates the `transferFlags` util to only transfer `keep_ssfi` when the
  `includeAll` argument is set to `true`.

- Updates assertion creation and proxify utils to only set `ssfi` if
  `keep_ssfi` isn't set.

- Updates inline docs to reflect expanded usage of `keep_ssfi`.
2017-03-23 18:04:15 -04:00
Keith Cirkel
ef2bf66d7c Merge pull request #899 from lucasfcosta/throw-for-non-functions-on-instanceof
Throw error when instanceof is passed something that is not a function as constructor
2017-03-23 09:55:55 +00:00