Commit graph

1530 commits

Author SHA1 Message Date
Josh Soref
b4344c34fe chore: spelling: adhere 2018-03-06 04:48:03 +00:00
Grant Snodgrass
25010c9884
Merge pull request #1141 from Powell-v2/patch-1
docs: corrected spelling
2018-03-04 19:53:57 -05:00
Jérémie Astori
3bd8d939cc
Merge pull request #1144 from meeber/fix-proxy-tests
test: stop modifying globals in Proxy tests
2018-03-04 18:02:57 -05:00
Grant Snodgrass
d89a9fe470 test: stop modifying globals in Proxy tests 2018-03-03 18:11:21 +00:00
Pavel Ermolin
eb0ea92700
docs: corrected spelling 2018-02-28 17:18:32 +00:00
asbish
97e24930bc feat: .lengthOf for Maps and Sets (#1131)
* feat: Add support for Map and Set to .lengthOf

* docs: Fix about .lengthOf
2018-02-11 15:33:32 +00:00
Grant Snodgrass
914665b0d6
Merge pull request #1135 from chaijs/greenkeeper/browserify-16.0.0
Update browserify to the latest version 🚀
2018-02-10 14:39:53 -05:00
greenkeeper[bot]
3ce8130bf4 chore(package): update browserify to version 16.0.0 2018-02-07 09:49:52 +00:00
Grant Snodgrass
eebe484d04 docs: fix wrong .property chaining examples (#1130) 2018-01-25 10:40:49 -08:00
Jérémie Astori
e354beeb17
Merge pull request #1126 from meeber/update-travis-node-versions
chore: update Node versions in Travis config
2018-01-14 21:05:54 -05:00
Jérémie Astori
c808e11ffc
Merge pull request #1124 from meeber/fix-deep-equal-stack
fix: remove Chai frames from `.deep.equal` stack
2018-01-14 21:05:10 -05:00
Jérémie Astori
76c0c16ca2
Merge pull request #1125 from chaijs/drop-opera
chore: remove Opera from Sauce config
2018-01-14 21:04:32 -05:00
Grant Snodgrass
2f46af85f2 fix: remove Chai frames from .deep.equal stack 2018-01-14 20:47:26 +00:00
Grant Snodgrass
c2395ceab4 chore: update Node versions in Travis config 2018-01-14 20:35:25 +00:00
Grant Snodgrass
c196aa083c chore: remove Opera from Sauce config
Sauce Labs stopped supporting Opera on 2017-09-29. Reference:
https://wiki.saucelabs.com/pages/viewpage.action?pageId=70074721
2018-01-14 20:11:02 +00:00
Jérémie Astori
c94f4b6400
Merge pull request #1118 from meeber/update-deps
chore: update dependencies
2018-01-14 13:00:17 -05:00
Grant Snodgrass
d3908a6688
Merge pull request #1117 from s-leroux/assert/fail/only-one-argument
feat: Add the assert.fail([message]) interface
2018-01-12 06:33:46 -05:00
Sylvain Leroux
0d1b5862fe feat: Add the .fail([message]) interface
Fix #1116.
The `assert.fail` interface should accept being called with
only 1 arguments to fail with a custom message.
2018-01-12 08:32:57 +01:00
Sophie Alpert
c02f64b160 perf: Optimize proxify and stringDistance (#1098)
- Fill 2D array with ints upfront to reduce property access cost
- Change from recursive to simpler iterative (DP) solution
- Add cap parameter to stringDistanceCapped to limit computation
- Make candidate generation use a simple loop to avoid allocating unnecessary arrays and to call stringDistance only once on each pair of strings instead of every time in the sort callback

This improves chai perf by about 13% on @bmeurer's https://github.com/v8/web-tooling-benchmark.
2018-01-07 20:55:11 +00:00
Grant Snodgrass
6a1840b3c3 chore: update dependencies 2018-01-07 15:42:55 +00:00
Colin Eberhardt
f54f71c234 docs: improve throws examples (#1113)
When throws is invoked with two arguments, where the second is a string or regexp, the second argument is the **errMsgMatcher**. The current examples imply that this string is the **message**  rather than the matcher.
2018-01-04 21:31:39 +00:00
Jérémie Astori
9c1a99f065
Merge pull request #1107 from tbroadley/fix-typos
Fix typos
2017-12-15 21:17:23 -05:00
Thomas Broadley
3d24db01d0 docs: fix typos 2017-12-15 19:28:40 -05:00
Andrew
0af30b79c9 feat(chai/config): add 'catch' to proxyExcludedKeys (#1101)
closes #1050
2017-12-10 18:25:07 +00:00
Benedikt Meurer
eae99d1502 fix: avoid repeated String#slice calls in stringDistance. (#1095)
The `stringDistance` function calls

```js
strA.slice(0, -1)
```

and

```js
strB.slice(0, -1)
```

multiple times, which is a bit of a waste of time here. JavaScript
engines cannot generally eliminate the duplicated calls easily, so
it's better to avoid the redundant calls altogether.

This improves the chai test on the
[web-tooling-benchmark](https://github.com/v8/web-tooling-benchmark) by
around 8% when run with upcoming V8 6.4.
2017-12-02 09:29:39 -02:00
Simone Vittori
9a6610eb1e docs: fix typos and remove trailing whitespaces (#1042) 2017-11-22 22:02:05 +00:00
Grant Snodgrass
6e9bfc1329 chore: update dependencies (#1074) 2017-11-04 00:52:09 -02:00
Grant Snodgrass
2eafe7339b
Merge pull request #1073 from brutalcrozt/codecov
Chore: change coverage service (coverall to codecov)
2017-10-30 07:52:51 -04:00
brutalcrozt
a89620fbaa Chore: change coverage service (coverall to codecov)
The reason of change mentioned on #927
  This patch:
    - add codecov as devDep, as it's not pre-installed by travis.
    - add codecov script on travis.
    - change badge link (coverall to codecov), and point the image to chai account on codecov.
  Fix #927
2017-10-29 22:10:14 +07:00
Ankit Singh
3ace4a0bbd property assertion should only accept strings if nested, fixes #1043 (#1044)
* property assertion should only accept strings if nested, fixes #1043

* similar logic seperated out

* test cases for fix #1043

* type check if not isNested with tests

* Tests for assert and should inteface

* Error message change

* changes in should and assert tests as per review

* assert tests modified

* Review comments changes

* review comments fixes
2017-10-02 17:44:05 -03:00
Keith Cirkel
19e2c18cff Merge pull request #1049 from abetomo/clean_code
Remove unnecessary code
2017-09-13 11:56:13 -07:00
abetomo
1c1b07490b Remove meaningless processing
numLinesEst does not seem to be used anywhere after this.
2017-09-13 15:10:14 +09:00
abetomo
62baf22a44 Fix string enclosed in single quotes in core/assertions.js
In other code in this file, the string was enclosed in single quotes
2017-09-13 15:10:14 +09:00
abetomo
7d1e815f22 Remove unused variable declaration
in utils/getMessage.js

in core/assertions.js
2017-09-13 15:09:36 +09:00
abetomo
d9aa813974 Remove unnecessary line feeds 2017-09-12 18:57:54 +09:00
Keith Cirkel
0d19b35182 Merge pull request #1048 from abetomo/fix_variable_declaration
Fix variable declaration
2017-09-12 02:15:40 -07:00
abetomo
84d1410c48 Remove unused variables 2017-09-12 11:18:20 +09:00
abetomo
2a12f71bf7 Fix to declare before using actual 2017-09-12 11:14:59 +09:00
Jérémie Astori
9489ecee82 Merge pull request #1047 from chaijs/assert-description
docs: correct `.ok` description
2017-09-10 23:49:59 -04:00
Jérémie Astori
312dc2a5a0 Merge pull request #1013 from meeber/add-package-lock
chore: add package-lock.json
2017-09-10 23:04:36 -04:00
Aleksey Shvayka
37dc80ddd0 docs: correct .ok description 2017-09-11 02:26:04 +03:00
Keith Cirkel
dbeae08fe5 Merge pull request #1040 from shvaikalesh/master
Make tests pass with `--use_strict`
2017-09-06 14:23:29 -07:00
Aleksey Shvayka
300b994ad3 do not attempt to define properties on primitives 2017-09-06 22:19:26 +03:00
Aleksey Shvayka
d4fde80a3c fix instanceof rethrow test 2017-09-06 22:19:10 +03:00
Aleksey Shvayka
6586e2dcbe add missing vars 2017-09-06 22:18:25 +03:00
Grant Snodgrass
529d395fa0 Merge pull request #1037 from Cutlery-Drawer/master
chai@4.1.2
2017-08-31 17:35:42 -04:00
Alhadis
b534fca6c0 chai@4.1.2 2017-08-31 21:57:15 +10:00
Jérémie Astori
c592551795 Merge pull request #1032 from Cutlery-Drawer/csp-fix
Use a hardcoded no-op instead of instancing
2017-08-23 16:00:02 -04:00
Alhadis
31c35595d7 Use a hardcoded no-op instead of instancing
The use of `new Function()` causes an EvalError if the environment's CSP
forbids execution of unsafe-eval. As there's no runtime evaluation being
performed, it's better to use a plain anonymous function instead.
2017-08-24 05:35:11 +10:00
Keith Cirkel
1ae9386901 Merge pull request #1025 from yanca018/master
Update license
2017-08-14 09:27:36 +01:00