Details
-
Bug
-
Status: Closed
-
Trivial
-
Resolution: Cannot Reproduce
-
4.0.1
-
None
-
Android 4.4, 5.0
Description
When running tests of cordova-plugin-file with Mobilespec, file.spec.83 failed. Error messages are listed below:
Error: Expected null to be 'asdfasdf'.
at stack(file:///android_asset/www/cdvtests/jasmine-2.0.0/jasmine.js:1292:17)
at buildExpectationResult(file:///android_asset/www/cdvtests/jasmine-2.0.0/jasmine.js:1269:14)
at Spec.Env.expectationResultFactory(file:///android_asset/www/cdvtests/jasmine-2.0.0/jasmine.js:483:18)
at Spec.addExpectationResult(file:///android_asset/www/cdvtests/jasmine-2.0.0/jasmine.js:259:46)
at Expectation.addExpectationResult(file:///android_asset/www/cdvtests/jasmine-2.0.0/jasmine.js/441:21)
at Expectation.toBe(file:///android_asset/www/cdvtests/jasmine-2.0.0/jasmine.js:1208:12)
at FileReader.verifier(file:///android_asset/www/plugins/cordova-plugin-file-tests/tests.js:2190:47)
When looking into the source code FileReader.js, it is found that readAsText is overrided. However, this function didn't return the expected result we want. And this problem happens only in tests. In daily usage, such problems don't appear.