apla / me.apla.cordova.app-preferences

App preferences plugin for cordova
Apache License 2.0
201 stars 209 forks source link

got very strange test results #25

Closed apla closed 9 years ago

apla commented 9 years ago

testPlugin();

[Error] fetched incorrect value for xint-test: expected 1 got null [Error] fetched incorrect value for xstring-test: expected "xxx" got null [Error] fetched incorrect value for xobj-test: expected {"a":"b"} got null [Error] fetched incorrect value for xempty-string-test: expected "xxx" got null [Error] fetched incorrect value for xarr-test: expected ["a","b"] got null [Log] 35 tests passed [Error] 5 tests failed

testPlugin();

[Error] fetched incorrect value for xint-test: expected 1 got null [Error] fetched incorrect value for xobj-test: expected {"a":"b"} got null [Error] fetched incorrect value for xarr-test: expected ["a","b"] got null [Error] fetched incorrect value for xstring-test: expected "xxx" got null [Log] 36 tests passed [Error] 4 tests failed

testPlugin();

[Error] fetched incorrect value for xint-test: expected 1 got null [Log] 39 tests passed [Error] 1 tests failed

testPlugin();

[Log] 40 tests passed

testPlugin();

[Log] 40 tests passed

testPlugin();

[Log] 40 tests passed

apla commented 9 years ago

Test should include cleanup function, which removes preferences. See Issue #23

apla commented 9 years ago

every value for dict is stored by launching new thread. so, whole dictionary is overwritten during nsuserdefaults synchronize