Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Refactored tests for 0.0.4

  • Loading branch information...
commit 4ef6da1f00d814d44fd19dbfc9c70a193122c976 1 parent db66483
@serby authored
Showing with 6 additions and 6 deletions.
  1. +6 −6 test/compact.test.js
View
12 test/compact.test.js
@@ -23,18 +23,18 @@ describe('compact.js', function() {
it('should error with invalid source path', function() {
(function() {
- var compact = require('../../compact').createCompact('invalid src path');
+ var compact = require('../../compact').createCompact({ srcPath: 'invalid src path' });
}).should.throw('Invalid source path \'invalid src path\'');
});
it('should create a missing invalid destination path', function() {
- var compact = require('../../compact').createCompact(srcPath, destPath + '/invalid-dest');
+ var compact = require('../../compact').createCompact({ srcPath: srcPath, destPath: destPath + '/invalid-dest' });
path.existsSync(destPath + '/invalid-dest').should.equal(true);
});
it('should succeed with valid paths', function() {
require('../../compact')
- .createCompact(srcPath, destPath).should.be.a('object');
+ .createCompact({ srcPath: srcPath, destPath: destPath }).should.be.a('object');
});
});
@@ -42,7 +42,7 @@ describe('compact.js', function() {
var compact;
beforeEach(function() {
- compact = require('../../compact').createCompact(srcPath, destPath);
+ compact = require('../../compact').createCompact({ srcPath: srcPath, destPath: destPath });
});
it('should fail on null', function() {
@@ -62,7 +62,7 @@ describe('compact.js', function() {
, compact;
beforeEach(function() {
- compact = require('../../compact').createCompact(srcPath, destPath);
+ compact = require('../../compact').createCompact({ srcPath: srcPath, destPath: destPath });
namespace = compact.addNamespace('global');
});
@@ -107,7 +107,7 @@ describe('compact.js', function() {
, compact;
beforeEach(function() {
- compact = require('../../compact').createCompact(srcPath, destPath);
+ compact = require('../../compact').createCompact({ srcPath: srcPath, destPath: destPath });
});
it('should error without parameter', function() {

0 comments on commit 4ef6da1

Please sign in to comment.
Something went wrong with that request. Please try again.