From f4626aa69e39fb439cad674aea596ab7fc5b15c4 Mon Sep 17 00:00:00 2001 From: Saq Imtiaz Date: Wed, 14 Jun 2023 18:57:43 +0200 Subject: [PATCH] Fix: Fix tests for deserialize[] so they can be run on browser as well as node.js (#7543) --- editions/test/tiddlers/tests/test-filters.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/editions/test/tiddlers/tests/test-filters.js b/editions/test/tiddlers/tests/test-filters.js index 1ffc73f17..811bbaa55 100644 --- a/editions/test/tiddlers/tests/test-filters.js +++ b/editions/test/tiddlers/tests/test-filters.js @@ -1066,7 +1066,11 @@ Tests the filtering mechanism. }); it("should handle the deserializers operator", function() { - expect(wiki.filterTiddlers("[deserializers[]]").join(",")).toBe("application/javascript,application/json,application/x-tiddler,application/x-tiddler-html-div,application/x-tiddlers,text/css,text/html,text/plain"); + var expectedDeserializers = ["application/javascript","application/json","application/x-tiddler","application/x-tiddler-html-div","application/x-tiddlers","text/css","text/html","text/plain"]; + if($tw.browser) { + expectedDeserializers.unshift("(DOM)"); + } + expect(wiki.filterTiddlers("[deserializers[]]").join(",")).toBe(expectedDeserializers.join(",")); }); it("should handle the charcode operator", function() {