Skip to content

Commit 979cc7e

Browse files
author
Vladimir Enchev
committed
test improved
1 parent a73c42c commit 979cc7e

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

apps/tests/xml-declaration/xml-declaration-tests.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,14 +165,19 @@ export function test_parse_ShouldParseBindingsToEvents() {
165165

166166
export function test_parse_ShouldParseBindingsToGestures() {
167167
var p = <page.Page>builder.parse("<Page><Label tap='{{ myTap }}' /></Page>");
168-
p.bindingContext = {
168+
var context = {
169169
myTap: function (args) {
170170
//
171171
}
172172
};
173+
174+
p.bindingContext = context;
173175
var lbl = <labelModule.Label>p.content;
174176

175-
TKUnit.assert((<any>lbl)._gesturesObserver !== undefined, "Expected result: true.");
177+
var observer = (<any>lbl)._gesturesObserver;
178+
179+
TKUnit.assert(observer !== undefined, "Expected result: true.");
180+
TKUnit.assert(observer._context === context, "Context should be equal to binding context. Actual result: " + observer._context);
176181
};
177182

178183
export function test_parse_ShouldParseSubProperties() {

0 commit comments

Comments
 (0)