/*\ title: test-deserializers.js type: application/javascript tags: [[$:/tags/test-spec]] Tests various core deserializers \*/ (function(){ /* jslint node: true, browser: true */ /* eslint-env node, browser, jasmine */ /* eslint no-mixed-spaces-and-tabs: ["error", "smart-tabs"]*/ /* global $tw, require */ "use strict"; describe("deserializer tests", function() { function executeTestCase(title,expectedOutput) { it("test case " + title, function() { var tiddler = $tw.wiki.getTiddler(title); expect($tw.wiki.deserializeTiddlers(tiddler.fields.type,tiddler.fields.text)).toEqual(expectedOutput); }); } executeTestCase("dezerializer test data case 1",[ { text: '\n', type: 'text/html' } ]); executeTestCase("dezerializer test data case 2",[ { text: '\n\n
\n\t\n\t