amdextract
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -81,3 +81,3 @@ /* | ||
unusedPaths = [], | ||
exceptsPaths = [], | ||
exceptsPaths = options.exceptsPaths, | ||
excepts = options.excepts, | ||
@@ -84,0 +84,0 @@ body, // Module body with comments |
{ | ||
"name": "amdextract", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "Extracts AMD modules and their parts.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -123,2 +123,3 @@ # amdextract [![Build Status](https://travis-ci.org/mehdishojaei/amdextract.png)](https://travis-ci.org/mehdishojaei/amdextract) | ||
## Release History | ||
* 2014-03-29 v1.0.3 Fix a bug when specifying exceptsPaths in options only. | ||
* 2014-03-17 v1.0.0 First release. |
@@ -110,2 +110,18 @@ var amdextract = require('..'); | ||
describe('when specifying exceptsPaths in options only', function() { | ||
var output = amdextract.parse( | ||
"define('name', ['p1', 'p2'], function(a) { return a; })", | ||
{ removeUnusedDependencies: true, exceptsPaths: ['p2'] } | ||
); | ||
var result = output.results[0]; | ||
it('.moduleId', function() { should(result.moduleId).equal('name'); }); | ||
it('.paths', function() { result.paths.should.be.eql(['p1', 'p2']); }); | ||
it('.dependencies', function() { result.dependencies.should.be.eql(['a']); }); | ||
it('.unusedPaths', function() { result.unusedPaths.should.be.eql([]); }); | ||
it('.unusedDependencies', function() { result.unusedDependencies.should.be.eql([]); }); | ||
it('.optimizedContent', function() { should(output.optimizedContent).be.equal( | ||
"define('name', ['p1', 'p2'], function(a) { return a; })" | ||
); }); | ||
}); | ||
describe('general test', function() { | ||
@@ -112,0 +128,0 @@ var output = parse('sample', { removeUnusedDependencies: true, exceptsPaths: ['t5', /^m/] }); |
17792
280
125