anacronw/js-fixtures

sandbox test fails on Firefox 24 and 27 in js-fixtures 1.3.1

Closed this issue · 2 comments

accepts booleans, numbers, and string

expected '<div data-blah="3" selected="true" class="blah"></div>' to equal '<div class="blah" selected="true" data-blah="3"></div>'
Assertion.prototype.assert@http://localhost/r/js-fixtures-1.3.1/node_modules/expect.js/expect.js:99
Assertion.prototype.equal@http://localhost/r/js-fixtures-1.3.1/node_modules/expect.js/expect.js:203
@http://localhost/r/js-fixtures-1.3.1/test/fixtures-spec.js:186
Runnable.prototype.run@http://localhost/r/js-fixtures-1.3.1/node_modules/mocha/mocha.js:4212
Runner.prototype.runTest@http://localhost/r/js-fixtures-1.3.1/node_modules/mocha/mocha.js:4584
next/<@http://localhost/r/js-fixtures-1.3.1/node_modules/mocha/mocha.js:4630
next@http://localhost/r/js-fixtures-1.3.1/node_modules/mocha/mocha.js:4510
next/<@http://localhost/r/js-fixtures-1.3.1/node_modules/mocha/mocha.js:4519
next@http://localhost/r/js-fixtures-1.3.1/node_modules/mocha/mocha.js:4463
Runner.prototype.hook/<@http://localhost/r/js-fixtures-1.3.1/node_modules/mocha/mocha.js:4487
timeslice@http://localhost/r/js-fixtures-1.3.1/node_modules/mocha/mocha.js:5480

Quick guess is that Firefox is serializing the HTML attributes in a different order, which should, in theory, be valid. If that's correct, presumably the thing to do is to make the test a bit more robust.

ahh nice catch, I'll look into this right now

Wonderful; thanks for the fix!