1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-12-28 02:50:27 +00:00

Fix: Fix tests for deserialize[] so they can be run on browser as well as node.js (#7543)

This commit is contained in:
Saq Imtiaz 2023-06-14 18:57:43 +02:00 committed by GitHub
parent edaa3727d9
commit f4626aa69e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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() {