Permalink
Browse files

fix COMPONENT_PATH tests

  • Loading branch information...
1 parent 72e6d5a commit 48b676779d2a2f48f07213d85dc2f6c07420c19e @tj tj committed Oct 24, 2012
View
3 .gitignore
@@ -2,3 +2,6 @@ node_modules
components
component.json
build
+!test/fixtures/path/component.json
+!test/fixtures/path/lib/bar/component.json
+!test/fixtures/path/lib/baz/component.json
View
4 test/build.js
@@ -10,7 +10,7 @@ var exec = require('child_process').exec
, vm = require('vm')
describe('component build', function(){
- describe('when COMPONENT_BUILD is set', function(){
+ describe('when COMPONENT_PATH is set', function(){
it('should build', function(done){
exec('cd test/fixtures/path && COMPONENT_PATH=lib ' + bin + '-build -v', function(err, stdout){
if (err) return done(err);
@@ -31,7 +31,7 @@ describe('component build', function(){
})
})
- describe('when COMPONENT_BUILD is omitted', function(){
+ describe('when COMPONENT_PATH is omitted', function(){
it('should fail', function(done){
exec('cd test/fixtures/path && ' + bin + '-build -v', function(err, stdout, stderr){
stderr.should.include('error');
View
7 test/fixtures/path/component.json
@@ -0,0 +1,7 @@
+{
+ "name": "foo",
+ "dependencies": {
+ "bar": "*"
+ },
+ "scripts": ["index.js"]
+}
View
1 test/fixtures/path/index.js
@@ -0,0 +1 @@
+module.exports = require('bar')
View
7 test/fixtures/path/lib/bar/component.json
@@ -0,0 +1,7 @@
+{
+ "name": "bar",
+ "scripts": ["index.js"],
+ "dependencies": {
+ "baz": "*"
+ }
+}
View
4 test/fixtures/path/lib/baz/component.json
@@ -0,0 +1,4 @@
+{
+ "name": "baz",
+ "scripts": ["index.js"]
+}

0 comments on commit 48b6767

Please sign in to comment.