Skip to content
This repository has been archived by the owner on Jun 26, 2022. It is now read-only.

Commit

Permalink
Test unusual bower.json defs
Browse files Browse the repository at this point in the history
  • Loading branch information
es128 committed Jul 9, 2014
1 parent 367df67 commit 4aecf8b
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 deletions.
1 change: 1 addition & 0 deletions test/bower_components/b/bower.json
@@ -1,6 +1,7 @@
{
"name": "b",
"main": "index.js",
"scripts": {"test": "rake"},
"dependencies": {
"a": "~1.0.0"
}
Expand Down
3 changes: 2 additions & 1 deletion test/bower_components/c/bower.json
@@ -1,6 +1,7 @@
{
"name": "c",
"main": "index.js",
"main": [],
"styles": ["index.js"],
"dependencies": {
"a": "~1.0.0",
"b": "~1.0.0"
Expand Down
3 changes: 2 additions & 1 deletion test/bower_components/d/bower.json
@@ -1,6 +1,7 @@
{
"name": "d",
"main": "index.js",
"main": [],
"scripts": ["index.js"],
"dependencies": {
"c": "~1.0.0"
}
Expand Down
8 changes: 8 additions & 0 deletions test/main-test.js
Expand Up @@ -18,6 +18,14 @@ describe('Main', function() {
});
});

it('should resolve the dependency files', function(done) {
read(__dirname, 'bower', function(error, packages) {
var files = [];
files.concat.apply(files, packages.map(getAttr('files'))).length.should.eql(6);
done();
});
});

it('should follow bowerrc', function(done) {
read(path.join(__dirname, 'bowerrc_fixture'), 'bower', function(error, packages) {
packages.map(getAttr('name')).should.eql(['other', 'some']);
Expand Down

0 comments on commit 4aecf8b

Please sign in to comment.