+ expect(html).toMatch(data);
+ }
+ });
+});
+
+
+/*
+ * parse HTML data to DOM, and run jQuery request on it
+ *
+ */
+describe("index-full.html jsdom + jquery", function() {
+ var window = require('jsdom').jsdom(html, null, {
+ FetchExternalResources: false,
+ ProcessExternalResources: false,
+ MutationEvents: false,
+ QuerySelector: false
+ }).createWindow();
+
+ /* apply jquery to the window */
+ var $ = jQuery = require('jquery').create(window);
+
+
+ it("html jquery test", function() {
+ expect(html).toBeDefined();
+
+ expect($("body").length == 0).toEqual(false);
+ expect($("body").length == 1).toEqual(true);
+ expect($("head").length == 1).toEqual(true);
+
+ var tags = flat_list([mkws_tags_required, mkws_tags_optional, mkws_tags_optional2]);
+ for(var i = 0; i < tags.length; i++) {
+ expect($("#" + tags[i]).length == 1).toEqual(true);