File: testrunner.js

package info (click to toggle)
sizzle 2.3.5%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 960 kB
  • sloc: javascript: 5,954; makefile: 7
file content (31 lines) | stat: -rw-r--r-- 625 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
( function() {
	var fixture;

	jQuery( "html" ).attr( {
		id: "html",

		lang: "en",
		"xml:lang": "en",

		dir: "ltr"
	} );

	jQuery( "body" ).attr( "id", "body" );

	// Look for karma template, if found, we are in the karma suite
	if ( window.__html__ ) {
		fixture = window.__html__[ "test/data/fixtures.html" ];

	// If template has not been found, it must be a QUnit suite
	} else {
		QUnit.config.autostart = false;
		jQuery.get( "data/fixtures.html" ).done( function( html ) {
			fixture = html;
			QUnit.start();
		} );
	}

	window.setup = function() {
		jQuery( "#qunit-fixture" ).replaceWith( fixture );
	};
} )();