Jesse MacFadyen created CB-671:
----------------------------------

             Summary: Tests should be described in enough detail to explain 
what specifically they are testing.
                 Key: CB-671
                 URL: https://issues.apache.org/jira/browse/CB-671
             Project: Apache Cordova
          Issue Type: Improvement
          Components: mobile-spec
            Reporter: Jesse MacFadyen
            Assignee: Filip Maj
            Priority: Minor


The following test is supposed to fail, however it is not clear why ...
Upon digging deeper, it appears that it is actually supposed to return a 
FileError.NOT_FOUND_ERR, but there is no way to know for sure, short of asking 
whoever wrote it.

Code from : 
https://github.com/apache/incubator-cordova-mobile-spec/blob/master/autotest/tests/file.tests.js#L255

it("resolve invalid URL", function() {
  var fail = jasmine.createSpy().andCallFake(function(error) {
      expect(error).toBeDefined();
      expect(error.code).toBe(FileError.ENCODING_ERR);
  }),
  win = createWin('window.resolveLocalFileSystemURI');

  // lookup file system entry
  runs(function() {
    window.resolveLocalFileSystemURI("/this.is.not.a.valid.url", win, fail);
  });

  waitsFor(function() { return fail.wasCalled; }, "error callback never 
called", Tests.TEST_TIMEOUT);

  runs(function() {
     expect(fail).toHaveBeenCalled();
     expect(win).not.toHaveBeenCalled();
   });
});

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to