mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Replace knownEvents modules with static strings.
This commit is contained in:
@@ -81,7 +81,7 @@ export function test_set_native_checked_triggers_propertyChanged() {
|
||||
function testAction(views: Array<viewModule.View>) {
|
||||
var checkedChanged = false;
|
||||
var allChanges = 0;
|
||||
mySwitch.on(observable.knownEvents.propertyChange, function (data: observable.EventData) {
|
||||
mySwitch.on(observable.Observable.propertyChangeEvent, function (data: observable.EventData) {
|
||||
allChanges++;
|
||||
var propertyData = <observable.PropertyChangeData>data;
|
||||
if (propertyData && propertyData.propertyName === "checked" && propertyData.value === true) {
|
||||
@@ -91,7 +91,7 @@ export function test_set_native_checked_triggers_propertyChanged() {
|
||||
|
||||
setNativeValue(mySwitch, true);
|
||||
|
||||
mySwitch.off(observable.knownEvents.propertyChange);
|
||||
mySwitch.off(observable.Observable.propertyChangeEvent);
|
||||
|
||||
TKUnit.assert(checkedChanged, "Property changed for checked not called.");
|
||||
TKUnit.assertEqual(allChanges, 1, "Property changed callbacks.");
|
||||
|
||||
Reference in New Issue
Block a user