<commit_before>
/**
 * Module dependencies.
 */

var Parser = require('../lib/parser')
  , nodes = require('../lib/nodes')
  , should = require('should');

module.exports = {
  'test variable': function(){
    var parser = new Parser('@foo')
      , ast = parser.parse();

    ast.should.be.an.instanceof(nodes.Block);
    ast.nodes[0].should.be.an.instanceof(nodes.Variable);
    ast.nodes[0].should.have.property('name', 'foo');
    ast.nodes[0].should.not.have.property('val');
  },
  
  'test variable assignment': function(){
    var parser = new Parser('@light-color: #fff')
      , ast = parser.parse();

    ast.should.be.an.instanceof(nodes.Block);
    ast.nodes[0].should.be.an.instanceof(nodes.Variable);
    ast.nodes[0].should.have.property('name', 'light-color');
    ast.nodes[0].val.should.be.an.instanceof(nodes.Color);
  },
  
  'test selector': function(){
    var parser = new Parser('body a\n  color #fff\n  font-size 12px')
      , ast = parser.parse();

    ast.should.be.an.instanceof(nodes.Block);<commit_msg>Fixed tests due to Root change<commit_after>
/**
 * Module dependencies.
 */

var Parser = require('../lib/parser')
  , nodes = require('../lib/nodes')
  , should = require('should');

module.exports = {
  'test variable': function(){
    var parser = new Parser('@foo')
      , ast = parser.parse();

    ast.should.be.an.instanceof(nodes.Root);
    ast.nodes[0].should.be.an.instanceof(nodes.Variable);
    ast.nodes[0].should.have.property('name', 'foo');
    ast.nodes[0].should.not.have.property('val');
  },
  
  'test variable assignment': function(){
    var parser = new Parser('@light-color: #fff')
      , ast = parser.parse();

    ast.should.be.an.instanceof(nodes.Root);
    ast.nodes[0].should.be.an.instanceof(nodes.Variable);
    ast.nodes[0].should.have.property('name', 'light-color');
    ast.nodes[0].val.should.be.an.instanceof(nodes.Color);
  },
  
  'test selector': function(){
    var parser = new Parser('body a\n  color #fff\n  font-size 12px')
      , ast = parser.parse();

    ast.should.be.an.instanceof(nodes.Root);
{'fraction_non_alphanumeric': 0.19404418828049952, 'fraction_numerical': 0.007684918347742555, 'mean_word_length': 3.3215767634854774, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6917804', 'n_tokens_mistral': 714, 'n_tokens_neox': 703, 'n_words': 116}