cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From audreyso <...@git.apache.org>
Subject [GitHub] cordova-lib pull request #510: Fixjasmine : CB:12018 - updating tests in cor...
Date Fri, 16 Dec 2016 23:32:02 GMT
Github user audreyso commented on a diff in the pull request:

    https://github.com/apache/cordova-lib/pull/510#discussion_r92903756
  
    --- Diff: cordova-lib/spec-plugman/install.spec.js ---
    @@ -345,13 +344,14 @@ describe('install', function() {
     
             it('should not check custom engine version that is not supported for platform',
function() {
                 var spy = spyOn(semver, 'satisfies').and.returnValue(true);
    -            runs(function() {
    -                installPromise( install('blackberry10', project, plugins['com.cordova.engine'])
);
    -            });
    -            waitsFor(function() { return done; }, 'install promise never resolved', 200);
    -            runs(function() {
    +            install('blackberry10', project, plugins['com.cordova.engine']).then(function(done)
{
    +                expect(false).toBe(true);
    +                done();
    +            },
    +            function err(errMsg) {
                     expect(spy).not.toHaveBeenCalledWith('','>=3.0.0');
    --- End diff --
    
    Thanks @stevengill ... It looks like in some of the other tests, it is going right to
fail on purpose? I can rewrite the test like this 
    
    ```
            it('should not check custom engine version that is not supported for platform',
function() {
                var spy = spyOn(semver, 'satisfies').and.returnValue(true);
    
                install('blackberry10', project, plugins['com.cordova.engine'])
                .then(function() {
                }).fail(function(error) {
                    expect(spy).not.toHaveBeenCalledWith('','>=3.0.0');
                }).fin (done); 
    }); ```
    
    Is this better? It still goes right to the fail.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


Mime
View raw message