Skip to content

Commit

Permalink
Added test for convertFile without options
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian Stuff committed Apr 20, 2016
1 parent de14321 commit 6fdf363
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/jsontosass.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,16 @@ describe('jsontosass', function () {
it('is present', function () {
assert.isFunction(jsontosass.convertFile);
});
it('should use defaultOptions when no options are given', function (done) {
var testFile = 'test/basic.scss';
jsontosass.convertFile('test/basic.json', testFile, function () {
fs.readFile(testFile, 'utf8', function (err, sass) {
if (err) throw err;
assert.equal(sass, '$key: value;');
done();
});
});
});
it('basic file conversion', function (done) {
var testFile = 'test/basic.scss';
jsontosass.convertFile('test/basic.json', testFile, { prettify: false }, function () {
Expand Down

0 comments on commit 6fdf363

Please sign in to comment.