incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Filip Maj (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-671) Tests should be described in enough detail to explain what specifically they are testing.
Date Tue, 08 May 2012 22:17:49 GMT

    [ https://issues.apache.org/jira/browse/CB-671?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13270889#comment-13270889
] 

Filip Maj commented on CB-671:
------------------------------

What's the reported failure message?

I think we can write a custom matcher for this to make this more explicit.
                
> 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

        

Mime
View raw message