Dong Hanlin created CB-9498:
-------------------------------
Summary: FileReader.prototype.readAsText runs malfunctionnally in
mobilespec
Key: CB-9498
URL: https://issues.apache.org/jira/browse/CB-9498
Project: Apache Cordova
Issue Type: Bug
Components: Android, mobile-spec, Plugin File
Affects Versions: 4.0.1
Environment: Android 4.4, 5.0
Reporter: Dong Hanlin
Priority: Minor
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.*
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]