mirror of
https://github.com/Hopiu/postal.js.git
synced 2026-04-13 03:21:05 +00:00
46 lines
No EOL
1.8 KiB
JavaScript
46 lines
No EOL
1.8 KiB
JavaScript
QUnit.specify("postal.js", function(){
|
|
describe("bindingsResolver", function(){
|
|
describe("When calling compare", function(){
|
|
describe("With topic Top.Middle.Bottom and binding Top.Middle.Bottom", function(){
|
|
var result = bindingsResolver.compare("Top.Middle.Bottom", "Top.Middle.Bottom"),
|
|
cached = bindingsResolver.cache["Top.Middle.Bottom"]["Top.Middle.Bottom"];
|
|
it("Result should be true", function() {
|
|
assert(result).isTrue();
|
|
});
|
|
it("Should create a resolver cache entry", function(){
|
|
assert(cached).isTrue();
|
|
});
|
|
});
|
|
describe("With topic Top.Middle.Bottom and binding Top.#.Bottom", function(){
|
|
var result = bindingsResolver.compare("Top.#.Bottom", "Top.Middle.Bottom"),
|
|
cached = bindingsResolver.cache["Top.Middle.Bottom"]["Top.#.Bottom"];
|
|
it("Result should be true", function() {
|
|
assert(result).isTrue();
|
|
});
|
|
it("Should create a resolver cache entry", function(){
|
|
assert(cached).isTrue();
|
|
});
|
|
});
|
|
describe("With topic Top.Middle.Bottom and binding Top.*.Bottom", function(){
|
|
var result = bindingsResolver.compare("Top.*.Bottom", "Top.Middle.Bottom"),
|
|
cached = bindingsResolver.cache["Top.Middle.Bottom"]["Top.*.Bottom"];
|
|
it("Result should be true", function() {
|
|
assert(result).isTrue();
|
|
});
|
|
it("Should create a resolver cache entry", function(){
|
|
assert(cached).isTrue();
|
|
});
|
|
});
|
|
describe("With topic Top.Middle.Bottom and binding #.*.Bottom", function(){
|
|
var result = bindingsResolver.compare("#.*.Bottom", "Top.Middle.Bottom"),
|
|
cached = bindingsResolver.cache["Top.Middle.Bottom"]["#.*.Bottom"];
|
|
it("Result should be true", function() {
|
|
assert(result).isTrue();
|
|
});
|
|
it("Should create a resolver cache entry", function(){
|
|
assert(cached).isTrue();
|
|
});
|
|
});
|
|
});
|
|
});
|
|
}); |