mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-30 05:19:57 +00:00
refactor: no need for new $tw.Wiki()
This commit is contained in:
parent
58507c06b4
commit
23489ce83c
@ -8,17 +8,11 @@ Tests the wikitext inverse-rendering from Wiki AST.
|
||||
\*/
|
||||
|
||||
describe("WikiAST serialization unit tests", function () {
|
||||
var wiki = new $tw.Wiki();
|
||||
|
||||
var cases = $tw.wiki.filterTiddlers("[all[shadows+tiddlers]tag[$:/tags/wikitext-serialize-test-spec]]");
|
||||
$tw.utils.each(cases, function (title) {
|
||||
wiki.addTiddler({
|
||||
title: title,
|
||||
text: wiki.getTiddlerText(title),
|
||||
});
|
||||
it("should serialize correctly for" + title, function () {
|
||||
var serialized = $tw.utils.serializeParseTree(wiki.parseTiddler(title).tree).trimEnd();
|
||||
expect(serialized).toBe(wiki.getTiddlerText(title).trimEnd());
|
||||
it("should serialize correctly for " + title, function () {
|
||||
var serialized = $tw.utils.serializeParseTree($tw.wiki.parseTiddler(title).tree).trimEnd();
|
||||
expect(serialized).toBe($tw.wiki.getTiddlerText(title).trimEnd());
|
||||
});
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user