19 Commits

Author SHA1 Message Date
jos
247aeabffa Refactor all unit tests to ES6 import/export 2018-10-31 21:17:23 +01:00
greenkeeper[bot]
c5971b371a Update standard to the latest version 🚀 (#1226)
* chore(package): update standard to version 12.0.0

* update to new lint version with --fix

I believe this mainly adds whitespace to `{}`'s.

* Replace assert.equal with assert.strictEqual

This breaks a lot of tests which I will endevour to fix in the next
commits.

* Fix most errors due to assert.strictEquals

Some instances of `strictEquals` are replaced by `deepEquals`.
`toString` has been used to make some string comparisions explicit.
Tests will still fail untill #1236 and #1237 are fixed.

* Fix assertion erros due to -0

With node 10, assert.strictEqual no longer considers `0 === -0`.
I missed these first time round as I was using node 8.

* Put toString correct side of bracket

I was converting the constructor to a string rather
than the result of the computation. Oops.

* Fixed #1236: quantileSeq has inconsistant return

* Update package-lock

* Fixed #1237: norm sometimes returning a complex number instead of number

* Fix cli tests

* More changes for standardjs, and fixes in unit tests
2018-09-08 16:33:58 +02:00
jos
0583771e4e Cleanup unused variables and imports 2018-06-13 17:25:51 +02:00
jos
cfd7698867 Fixed duplicate variable definitions 2018-06-13 16:36:13 +02:00
jos
17f07ec098 Fixed incompatibility with v4 (index.js file) 2018-06-13 14:02:50 +02:00
jos
b3b96749bf Refactored var into const/let, and removed a lot of semicolons 2018-06-13 12:21:14 +02:00
jos
024b2a9e26 Fix most lint errors using npx standard --fix 2018-06-10 20:28:27 +02:00
jos
635cd0b574 Revert using /lib/ in tests, use /src/ again. Fixed coverage testing. WIP 2018-06-06 22:11:52 +02:00
jos
79071b5e4f Fixed npm run test:browser not working (WIP) 2018-06-06 21:30:41 +02:00
jos
0c084b8e20 npm test working now 2018-06-06 15:36:36 +02:00
jos
a60f3c8d9d Fixed a security issue where forbidden properties like constructor could be replaced by using unicode characters when creating an object 2017-11-18 20:11:48 +01:00
jos
8c2f10a865 Fixed #915: No access to property "name" 2017-08-07 20:09:12 +02:00
jos
eb5ec9cc26 Added some more unit tests 2017-07-29 10:52:43 +02:00
Thomas Brierley
743854e1d4 Remove property ghosting tests (no longer restricted) 2017-07-14 13:10:46 +01:00
Thomas Brierley
ac002370bd Add test for ghosting custom properties 2017-07-12 16:36:06 +01:00
Thomas Brierley
1dd67cd591 Fix undefined isSafeProperty test + comment 2017-07-04 20:03:06 +01:00
Thomas Brierley
7d6c583629 Add isSafeProperty unit tests 2017-07-04 19:43:05 +01:00
Thomas Brierley
badc6efc1a Update tests for isSafe changes
+ Fix "calling Function via Object.assign" test. Now fails on accesing
"bind" first because new implementation is a bit more restrictive.

+ Fix "extend the class instance". Custom methods on instances are now
allowed and ghosting (overridding) is explicitly not.

+ Add ghosting tests for class instances and plain objects.
2017-06-29 15:53:49 +01:00
jos
ed5f2cebaf Security fixes in isSafeMethod and some others 2017-05-27 19:51:12 +02:00