Use test262 format for tests, and submit your tests to test262 #278
Description
If you guys are interested in this, you have some of the better tests in existence, and test262 would benefit from them greatly. Then hopefully stupid things like Safari's non-compliant implementations would not happen, because everybody would be running your tests :)
I'd love to help in any way I can to make this process more smooth, if you are up for it.
I am trying to blaze the trail with my Array.prototype.contains reference implementation: notably the package.json which configures the test runner, and the tests themselves. One big thing to notice is that test262 favors lots of small little files---more or less one for each Mocha it
.
I imagine in the process you will find test262 to be pretty anemic compared to Mocha/Chai. In particular we currently do if (!condition) { $ERROR(msg); }
instead of assert(condition, message)
. I think (@bterlson can correct me if I'm wrong) that putting together a basic assert library, containing e.g. assert
, assertEqual
, assertOwnPropertiesEqual
or a few other things, would probably be OK. Maybe a good first step would be to figure out the minimum set of assertions you'd need, and if we agree on them, get them into test262 as helpers.
Also tagging in @smikes who has been doing great test262 work and can probably help advise.