Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
2betop committed Jan 27, 2015
1 parent cfc8390 commit f763c93
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
File renamed without changes.
16 changes: 4 additions & 12 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,12 @@

var source = 'ul{li{color:white;}}',
expect = /^ul\s*li\s*{/i,
sass = require('./index.js');
sass = require('./lib/index.js');

if ( !sass.renderSync({ data: source }).match( expect ) ) {
var ret = sass.renderSync({ file: 'xxx.scss', data: source });

if ( !ret.css.match( expect ) ) {
throw new Error( 'Some thing wrong.' );
} else {
console.log( 'Simple test passed!');
}


var fs = require('fs');
source = fs.readFileSync('test.sass', 'utf-8');
expect = fs.readFileSync('expect.css', 'utf-8');
if ( sass.renderSync({ data: source, sassSyntax: true }) === expect ) {
console.log( 'Sass syntax supported.');
} else {
console.log( 'Sass syntax unsupported.');
}

0 comments on commit f763c93

Please sign in to comment.