mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-12-25 17:40:29 +00:00
Merge pull request #1430 from tobibeer/1378-tests-sorting-unlisted-tiddlers
update tagging filter tests
This commit is contained in:
commit
040ed56de5
@ -33,13 +33,13 @@ describe("Filter tests", function() {
|
||||
tiddler: new $tw.Tiddler({title: "TiddlerSeventh",
|
||||
text: "",
|
||||
list: "TiddlerOne [[Tiddler Three]] [[a fourth tiddler]] MissingTiddler",
|
||||
tags: []
|
||||
tags: ["one"]
|
||||
}),
|
||||
},
|
||||
"Tiddler8": {
|
||||
tiddler: new $tw.Tiddler({title: "Tiddler8",
|
||||
text: "Tidd",
|
||||
tags: [],
|
||||
tags: ["one"],
|
||||
"test-field": "JoeBloggs"
|
||||
})
|
||||
}
|
||||
@ -162,11 +162,11 @@ describe("Filter tests", function() {
|
||||
});
|
||||
|
||||
it("should handle the tagging operator", function() {
|
||||
expect(wiki.filterTiddlers("[[one]tagging[]sort[title]]").join(",")).toBe("Tiddler Three,TiddlerOne");
|
||||
expect(wiki.filterTiddlers("[[one]tagging[]]").join(",")).toBe("Tiddler Three,TiddlerOne");
|
||||
expect(wiki.filterTiddlers("[[one]tagging[]sort[title]]").join(",")).toBe("Tiddler Three,Tiddler8,TiddlerOne,TiddlerSeventh");
|
||||
expect(wiki.filterTiddlers("[[one]tagging[]]").join(",")).toBe("Tiddler Three,TiddlerOne,Tiddler8,TiddlerSeventh");
|
||||
expect(wiki.filterTiddlers("[[two]tagging[]sort[title]]").join(",")).toBe("$:/TiddlerFive,$:/TiddlerTwo,Tiddler Three");
|
||||
var fakeWidget = {getVariable: function() {return "one";}};
|
||||
expect(wiki.filterTiddlers("[all[current]tagging[]sort[title]]",fakeWidget).join(",")).toBe("Tiddler Three,TiddlerOne");
|
||||
expect(wiki.filterTiddlers("[all[current]tagging[]]",fakeWidget).join(",")).toBe("Tiddler Three,TiddlerOne,Tiddler8,TiddlerSeventh");
|
||||
});
|
||||
|
||||
it("should handle the untagged operator", function() {
|
||||
|
Loading…
Reference in New Issue
Block a user