Skip to content

Commit

Permalink
fixed assets path
Browse files Browse the repository at this point in the history
  • Loading branch information
NewtonNiu committed Apr 25, 2014
1 parent 1c5953b commit 7823366
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/tokens-spec.js
Expand Up @@ -2,8 +2,10 @@
* Created by Newton on 2014/4/25.
*/
var fs = require('fs'),
path = require('path'),
should = require('should'),
libdir = process.env.CMD_COVERAGE ? '../lib-cov' : '../lib',
assetsdir = path.join(__dirname, 'assets'),
Tokens = require(libdir + '/tokens'),
TokenType = require(libdir + '/token-type');

Expand All @@ -26,8 +28,8 @@ describe('Tokens', function (){
});

it('base.css\'s tokens should be equal base.json', function (){
var basecss = fs.readFileSync('./assets/base.css', 'utf8'),
basejson = fs.readFileSync('./assets/base.json', 'utf8'),
var basecss = fs.readFileSync(path.join(assetsdir, 'base.css'), 'utf8'),
basejson = fs.readFileSync(path.join(assetsdir, 'base.json'), 'utf8'),
tokens = new Tokens(basecss);

should.deepEqual(tokens, JSON.parse(basejson));
Expand Down

0 comments on commit 7823366

Please sign in to comment.