Github user jsoref commented on a diff in the pull request:

    https://github.com/apache/cordova-plugman/pull/66#discussion_r10821101
  
    --- Diff: spec/install.spec.js ---
    @@ -348,13 +349,58 @@ describe('install', function() {
                     runs(function () {
                         installPromise( install('android', project, 
plugins['G']) );
                     });
    -                waitsFor(function () { return done; }, 'install promise 
never resolved', 500);
    +                waitsFor(function () { return done; }, 'install promise 
never resolved', 200);
                     runs(function () {
                         var install = common.spy.getInstall(emit);
            
                         expect(done.message).toEqual('Cyclic dependency from G 
to H');
                     });
    -            });                            
    +            });    
    +
    +            it('install subdir relative to top level plugin if no fetch 
meta', function() {
    +                runs(function () {
    +                    installPromise(install('android', project, 
plugins['B']));
    +                });
    +                waitsFor(function () { return done; }, 'install promise 
never resolved', 200);
    +                runs(function () {
    +                    var install = common.spy.getInstall(emit);
    +
    +                    expect(install).toEqual([
    +                        'Install start for "D" on android.',
    +                        'Install start for "E" on android.',
    +                        'Install start for "B" on android.'
    +                    ]);
    +                });
    +            });
    +
    +            it('install uses meta data (if available) of top level plugin 
source', function() {
    +                // Fake metadata so plugin 'B' appears from 'meta/B'
    +                var meta = require('../src/util/metadata');
    +                spyOn(meta, 'get_fetch_metadata').andCallFake(function(){  
                                                                                
                                                
    +                    return {
    +                        source: {type: 'dir', url: path.join(plugins['B'], 
'..', 'meta')}
    +                    };
    +                });
    +
    +                runs(function () {
    +                    installPromise(install('android', project, 
plugins['B']));
    +                });
    +                waitsFor(function () { return done; }, 'install promise 
never resolved', 200);
    +                runs(function () {
    +                    var install = common.spy.getInstall(emit);
    +
    +                    expect(install).toEqual([
    +                        'Install start for "D" on android.',
    +                        'Install start for "E" on android.',
    +                        'Install start for "B" on android.'
    +                    ]);
    +
    +                    var copy = common.spy.startsWith(emit, "Copying from");
    +                    expect(copy.length).toBe(3);
    +                    expect(copy[0].indexOf(path.normalize('meta/D')) > 
0).toBe(true);
    +                    
expect(copy[1].indexOf(path.normalize('meta/subdir/E')) > 0).toBe(true);
    +                });
    +            });                    
    --- End diff --
    
    This introduces trailing whitespace. Please don't.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to