Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
xzyfer committed Mar 30, 2017
1 parent bdb0f71 commit bdde742
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
4 changes: 3 additions & 1 deletion bin/node-sass
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,9 @@ function watch(options, emitter) {
graph = buildGraph(options);
});

if (process.NODE_ENV === 'test') {
emitter.emit('warn', process.env.NODE_ENV);

if (process.env.NODE_ENV === 'test') {
emitter.emit('warn', 'TESTING');
}
}
Expand Down
19 changes: 10 additions & 9 deletions test/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ var assert = require('assert'),
tmpDir = require('unique-temp-dir'),
fixture = path.join.bind(null, __dirname, 'fixtures');

process.NODE_ENV = 'test';
process.env.NODE_ENV = 'test';

describe.only('cli', function() {
// For some reason we experience random timeout failures in CI
// due to spawn hanging/failing silently. See #1692.
// this.retries(4);

describe.only('node-sass < in.scss', function() {
describe.skip('node-sass < in.scss', function() {
it('should read data from stdin', function(done) {
var src = fs.createReadStream(fixture('simple/index.scss'));
var expected = read(fixture('simple/expected.css'), 'utf8').trim();
Expand Down Expand Up @@ -391,7 +391,8 @@ describe.only('cli', function() {
bin.stdout.once('data', function() {
assert.fail('should not emit console output when watching a directory');
});
bin.stderr.once('data', function () {
bin.stderr.once('data', function (data) {
console.log('stderr', data.toString());
touch(srcFile);
});
bin.on('error', assert.fail);
Expand Down Expand Up @@ -436,7 +437,7 @@ describe.only('cli', function() {
});
});

describe('node-sass in.scss --output out.css', function() {
describe.skip('node-sass in.scss --output out.css', function() {
it('should compile a scss file to build.css', function(done) {
var src = fixture('simple/index.scss');
var dest = fixture('simple/index.css');
Expand Down Expand Up @@ -529,7 +530,7 @@ describe.only('cli', function() {
});
});

describe('node-sass sass/ --output css/', function() {
describe.skip('node-sass sass/ --output css/', function() {
it('should create the output directory', function(done) {
var src = fixture('input-directory/sass');
var dest = fixture('input-directory/css');
Expand Down Expand Up @@ -645,7 +646,7 @@ describe.only('cli', function() {
});
});

describe('node-sass in.scss --output path/to/file/out.css', function() {
describe.skip('node-sass in.scss --output path/to/file/out.css', function() {
it('should create the output directory', function(done) {
var src = fixture('output-directory/index.scss');
var dest = fixture('output-directory/path/to/file/index.css');
Expand All @@ -665,7 +666,7 @@ describe.only('cli', function() {

});

describe.only('node-sass --follow --output output-dir input-dir', function() {
describe.skip('node-sass --follow --output output-dir input-dir', function() {
it('should compile with the --follow option', function(done) {
var src = fixture('follow/input-dir');
var dest = fixture('follow/output-dir');
Expand All @@ -691,7 +692,7 @@ describe.only('cli', function() {
});
});

describe.only('importer', function() {
describe.skip('importer', function() {
var dest = fixture('include-files/index.css');
var src = fixture('include-files/index.scss');
var expected = read(fixture('include-files/expected-importer.css'), 'utf8').trim().replace(/\r\n/g, '\n');
Expand Down Expand Up @@ -818,7 +819,7 @@ describe.only('cli', function() {
});
});

describe.only('functions', function() {
describe.skip('functions', function() {
it('should let custom functions call setter methods on wrapped sass values (number)', function(done) {
var dest = fixture('custom-functions/setter.css');
var src = fixture('custom-functions/setter.scss');
Expand Down

0 comments on commit bdde742

Please sign in to comment.