Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mariocasciaro committed Dec 4, 2013
1 parent ea6167c commit 11dc5e2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/test.js
Expand Up @@ -8,14 +8,14 @@ describe('extend', function() {
it('should extend module declaration with no dependencies', function() {
var src = "angular.module('moduleName');";
var res = angularExtend(src, {moduleName: ['test']});
expect(res).to.be.equal("angular.module('moduleName', [\"test\"]);");
expect(res.out).to.be.equal("angular.module('moduleName', [\"test\"]);");
});


it('should extend module declaration with existing dependencies', function() {
var src = "angular.module('moduleName', ['test']);";
var res = angularExtend(src, {moduleName: ['test1']});
expect(res).to.be.equal("angular.module('moduleName', [\"test\",\"test1\"]);");
expect(res.out).to.be.equal("angular.module('moduleName', [\"test\",\"test1\"]);");
});


Expand All @@ -26,6 +26,7 @@ describe('extend', function() {
mod2: ['test3']
});
var expected = fs.readFileSync('test/expected/multiple.js', 'utf-8');
expect(res).to.be.equal(expected);
expect(res.out).to.be.equal(expected);
expect(res.changed).to.be.true;
});
});

0 comments on commit 11dc5e2

Please sign in to comment.