Commit 2bc6dd2b by blopker

added test and realized --source-map is not boolean

parent d0af5fe6
...@@ -15,8 +15,7 @@ var optimist = require('optimist') ...@@ -15,8 +15,7 @@ var optimist = require('optimist')
'default': 'none' 'default': 'none'
}) })
.options('source-map', { .options('source-map', {
describe: 'Emit source map', describe: 'Emit source map'
type: 'boolean'
}) })
.options('include-path', { .options('include-path', {
describe: 'Path to look for @import-ed files', describe: 'Path to look for @import-ed files',
......
...@@ -116,6 +116,15 @@ describe('cli', function() { ...@@ -116,6 +116,15 @@ describe('cli', function() {
}); });
}); });
it('should write the stdout with the --stdout option', function(done){
var emitter = cli(['--stdout', path.join(__dirname, 'sample.scss')]);
emitter.on('error', done);
emitter.on('log', function(css){
assert.equal(css, expectedSampleNoComments);
done();
});
});
it('should compile with the --source-map option', function(done){ it('should compile with the --source-map option', function(done){
var emitter = cli([path.join(__dirname, 'sample.scss'), '--source-map']); var emitter = cli([path.join(__dirname, 'sample.scss'), '--source-map']);
emitter.on('error', done); emitter.on('error', done);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment