Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix COMPONENT_PATH tests

  • Loading branch information...
commit 48b676779d2a2f48f07213d85dc2f6c07420c19e 1 parent 72e6d5a
TJ Holowaychuk tj authored
3  .gitignore
View
@@ -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
4 test/build.js
View
@@ -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');
7 test/fixtures/path/component.json
View
@@ -0,0 +1,7 @@
+{
+ "name": "foo",
+ "dependencies": {
+ "bar": "*"
+ },
+ "scripts": ["index.js"]
+}
1  test/fixtures/path/index.js
View
@@ -0,0 +1 @@
+module.exports = require('bar')
7 test/fixtures/path/lib/bar/component.json
View
@@ -0,0 +1,7 @@
+{
+ "name": "bar",
+ "scripts": ["index.js"],
+ "dependencies": {
+ "baz": "*"
+ }
+}
4 test/fixtures/path/lib/baz/component.json
View
@@ -0,0 +1,4 @@
+{
+ "name": "baz",
+ "scripts": ["index.js"]
+}
Please sign in to comment.
Something went wrong with that request. Please try again.