paulmillr / es6-shim

ECMAScript 6 compatibility shims for legacy JS engines
http://paulmillr.com
MIT License
3.11k stars 387 forks source link

- #337

Closed Yaffle closed 9 years ago

ljharb commented 9 years ago

Please add tests that would fail without all of these changes.

Yaffle commented 9 years ago

@ljharb , for test/math.js it is possible to use code between line 1427 and line 1459, almostEqual at https://github.com/paulmillr/es6-shim/blob/master/test/math.js#L4 should be changed to use same code as isNear, so it will measure relative error, not absolute, and it will work better for small values

Yaffle commented 9 years ago

... I do not know how to work with git.

ljharb commented 9 years ago

I've done the var x changes in master, so you'll want to rebase onto the latest master (and also reduce the 5 commits down).

As for isNear - I'd be happy to accept a separate PR to change the almostEqual expect implementation to be more precise, and update the associated tests.

Yaffle commented 9 years ago

@ljharb continuation in https://github.com/paulmillr/es6-shim/pull/338

ljharb commented 9 years ago

@Yaffle Please don't do this in the future - creating extra pull requests clutters up the repo, and they can't ever be deleted. Stick with one branch name per pull request.