Skip to content
This repository has been archived by the owner on Apr 5, 2021. It is now read-only.

Commit

Permalink
more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
a-tokyo committed Jan 31, 2017
1 parent 9db6548 commit c29bf4f
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/utils-spec.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const genUtils = require('../generators/utils');
const fs = require('fs-extra');
const path = require('path');
const assert = require('assert');
const should = require('should');
const testUtils = require('./test-utils');

Expand All @@ -20,4 +21,15 @@ describe('Utils', function() {
fs.existsSync(dirPath).should.not.throw();
});
});

describe('removeLineFromFile()', function() {
it('should not throw when the line is not found', function() {
try{
genUtils.removeLineFromFile('comp.component.js','BlaBlaBlaLineNoExistStarWarsGameOfThrones', path.join(__dirname, './test-scenarios/test-remove/src/app/components/comp'));
}
catch(err){
assert(err!==null);
}
});
});
});

0 comments on commit c29bf4f

Please sign in to comment.