-/* Copyright (c) 2013 Index Data ApS. http://indexdata.com
+/* Copyright (c) 2013-2015 Index Data ApS. http://indexdata.com
*
- * jQuery test
+ * jquery test
*
*/
-describe("jQuery suite simple", function () {
- var $ = require('jQuery');
+describe("jquery suite simple", function () {
+ var $ = require('jquery')(require("jsdom").jsdom().parentWindow);
- it("jQuery append test", function () {
+ it("jquery append test", function () {
$("body").append("<h1>test passes h1</h1>");
expect($("body").html()).toMatch(/<h1>/);
$("<p>this is a paragraph</p>").appendTo("h1");
+++ /dev/null
-/* Copyright (c) 2013 Index Data ApS. http://indexdata.com
- *
- * jQuery test with DOM/windows object
- *
- */
-
-describe("jQuery suite", function () {
- var jsdom = require('jsdom').jsdom;
- var myWindow = jsdom().createWindow();
-
- var $ = require('jQuery');
- var jq = require('jQuery').create();
- var jQuery = require('jQuery').create(myWindow);
-
- it("jQuery append test", function () {
- jQuery("<h1>test passes h1</h1>").appendTo("body");
- expect(jQuery("body").html()).toMatch(/<h1>/);
- });
-
- it("$ append test", function () {
- $("<h2>test passes h2</h2>").appendTo("body");
- expect($("body").html()).toMatch(/<h2>/);
- });
-
- it("jq append test", function () {
- jq("<h2>test passes h2</h2>").appendTo("body");
- expect(jq("body").html()).toMatch(/<h2>/);
- });
-
- it("window test", function () {
- expect(myWindow).toBeDefined();
- });
-});