From 9498937b43157cad8db9bb7028850ffdbcb7c412 Mon Sep 17 00:00:00 2001 From: ansuz Date: Wed, 20 Apr 2016 18:15:17 +0200 Subject: [PATCH] add a FIXME to the assert page tests were failing (unnecessarily) on Chrome --- www/assert/main.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/www/assert/main.js b/www/assert/main.js index 6fe063385..840cdbe29 100644 --- a/www/assert/main.js +++ b/www/assert/main.js @@ -1,9 +1,11 @@ +require.config({ paths: { 'json.sortify': '/bower_components/json.sortify/dist/JSON.sortify' } }); define([ '/bower_components/jquery/dist/jquery.min.js', '/common/hyperjson.js', // serializing classes as an attribute '/common/hyperscript.js', // using setAttribute - '/common/TextPatcher.js' -], function (jQuery, Hyperjson, Hyperscript, TextPatcher) { + '/common/TextPatcher.js', + 'json.sortify', +], function (jQuery, Hyperjson, Hyperscript, TextPatcher, JSONSortify) { var $ = window.jQuery; window.Hyperjson = Hyperjson; window.Hyperscript = Hyperscript; @@ -38,6 +40,10 @@ define([ var $body = $('body'); + /* FIXME + Chrome reorganizes your HTML such that id and class are in a opposite + orders. We need to do an equality check on the hyperjson, outerHTML + differences are not informative. */ var roundTrip = function (target) { assert(function () { var hjson = Hyperjson.fromDOM(target);