Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Create test for installing dependencies using custom servers

  • Loading branch information...
commit f2c74d3c647898cd72b2c6519edcb8b740937023 1 parent aa7c059
@jeremyworboys jeremyworboys authored tj committed
Showing with 29 additions and 0 deletions.
  1. +29 −0 test/remotes.js
View
29 test/remotes.js
@@ -23,6 +23,19 @@ describe('component install from remote', function(){
})
before(function(done){
+ mkdir('test/private-registry/testdependencies/master', done);
+ })
+
+ before(function(done){
+ fs.writeFile('test/private-registry/testdependencies/master/component.json', JSON.stringify({
+ name: 'testdependencies',
+ repo: 'private-registry/testdependencies',
+ remotes: ['http://localhost:3000'],
+ dependencies: {'private-registry/testcomponent': "*"}
+ }), done);
+ })
+
+ before(function(done){
app.use(express.static(__dirname));
app.listen(3000, done);
})
@@ -63,6 +76,22 @@ describe('component install from remote', function(){
done();
})
})
+
+ it('should install private dependencies', function(done){
+ exec('bin/component install private-registry/testdependencies', function(err, stdout, stderr){
+ if (err) return done(err);
+ stdout.should.include('install');
+ stdout.should.include('dep');
+ stdout.should.include('complete');
+ var json = require(path.resolve('components/private-registry-testdependencies/component.json'));
+ json.name.should.equal('testdependencies');
+ json.repo.should.equal('private-registry/testdependencies');
+ json = require(path.resolve('components/private-registry-testcomponent/component.json'));
+ json.name.should.equal('testcomponent');
+ json.repo.should.equal('private-registry/testcomponent');
+ done();
+ })
+ })
})
describe('with authentication', function(){
Please sign in to comment.
Something went wrong with that request. Please try again.