mazda-specs-crepe/node_modules/jsdom/test.js

18 lines
493 B
JavaScript
Raw Normal View History

2013-02-19 07:02:59 +00:00
"use strict";
var assert = require("assert");
var jsdom = require("./lib/jsdom");
var cssom = require("cssom");
console.log(cssom.parse(require("fs").readFileSync('test.css', 'utf-8')));
jsdom.env({
html: '<html><head><style>' + require("fs").readFileSync('test.css') + '</style></head><body></body></html>',
config: {
ProcessExternalResources: ["script", "link"]
},
done: function (errors, window) {
window.getComputedStyle(window.document.body);
}
});