Get css tests passing (wrong test start rule) and update jsdom library paths

This commit is contained in:
c-spencer 2011-05-19 19:59:50 +01:00
commit 40eba3a401
2 changed files with 6 additions and 6 deletions

View file

@ -51,21 +51,21 @@ module.exports = {
"test: tokenize pixel number" : function() {
var line = "-12px";
var tokens = this.tokenizer.getLineTokens(line, "start").tokens;
var tokens = this.tokenizer.getLineTokens(line, "ruleset").tokens;
assert.equal(1, tokens.length);
assert.equal("constant.numeric", tokens[0].type);
},
"test: tokenize hex3 color" : function() {
var tokens = this.tokenizer.getLineTokens("#abc", "start").tokens;
var tokens = this.tokenizer.getLineTokens("#abc", "ruleset").tokens;
assert.equal(1, tokens.length);
assert.equal("constant.numeric", tokens[0].type);
},
"test: tokenize hex6 color" : function() {
var tokens = this.tokenizer.getLineTokens("#abc012", "start").tokens;
var tokens = this.tokenizer.getLineTokens("#abc012", "ruleset").tokens;
assert.equal(1, tokens.length);
assert.equal("constant.numeric", tokens[0].type);
@ -81,7 +81,7 @@ module.exports = {
},
"test for last rule in ruleset to catch capturing group bugs" : function() {
var tokens = this.tokenizer.getLineTokens("top", "start").tokens;
var tokens = this.tokenizer.getLineTokens("top", "ruleset").tokens;
assert.equal(1, tokens.length);
assert.equal("support.type", tokens[0].type);

View file

@ -1,5 +1,5 @@
var dom = require('jsdom/level2/html').dom.level2.html;
var browser = require('jsdom/browser/index').windowAugmentation(dom);
var dom = require('jsdom/lib/jsdom/level2/html').dom.level2.html;
var browser = require('jsdom/lib/jsdom/browser/index').windowAugmentation(dom);
global.document = browser.document;
global.window = browser.window;