-
Notifications
You must be signed in to change notification settings - Fork 781
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test: Cover config.fixture with null or custom string, improve docs
- Loading branch information
Showing
6 changed files
with
78 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>config-fixture-null</title> | ||
<link rel="stylesheet" href="../src/qunit.css"> | ||
<script src="../qunit/qunit.js"></script> | ||
<script src="config-fixture-null.js"></script> | ||
</head> | ||
<body> | ||
<div id="qunit"></div> | ||
<div id="qunit-fixture">test markup</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/* eslint-env browser */ | ||
QUnit.module('QUnit.config [fixture=null]'); | ||
|
||
QUnit.config.reorder = false; | ||
QUnit.config.fixture = null; | ||
|
||
QUnit.test('make dirty', function (assert) { | ||
assert.strictEqual(QUnit.config.fixture, null); | ||
|
||
var fixture = document.querySelector('#qunit-fixture'); | ||
fixture.textContent = 'dirty'; | ||
}); | ||
|
||
QUnit.test('find dirty', function (assert) { | ||
assert.strictEqual(QUnit.config.fixture, null); | ||
|
||
var fixture = document.querySelector('#qunit-fixture'); | ||
assert.strictEqual(fixture.textContent, 'dirty'); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>config-fixture-string</title> | ||
<link rel="stylesheet" href="../src/qunit.css"> | ||
<script src="../qunit/qunit.js"></script> | ||
<script src="config-fixture-string.js"></script> | ||
</head> | ||
<body> | ||
<div id="qunit"></div> | ||
<div id="qunit-fixture">test markup</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/* eslint-env browser */ | ||
QUnit.module('QUnit.config [fixture=string]'); | ||
|
||
QUnit.config.reorder = false; | ||
QUnit.config.fixture = '<p>Hi <strong>there</strong>, stranger!</p>'; | ||
|
||
QUnit.test('example [first]', function (assert) { | ||
var fixture = document.querySelector('#qunit-fixture'); | ||
|
||
assert.strictEqual(fixture.textContent, 'Hi there, stranger!'); | ||
|
||
fixture.querySelector('strong').remove(); | ||
|
||
assert.strictEqual(fixture.textContent, 'Hi , stranger!'); | ||
}); | ||
|
||
QUnit.test('example [second]', function (assert) { | ||
var fixture = document.querySelector('#qunit-fixture'); | ||
assert.strictEqual(fixture.textContent, 'Hi there, stranger!'); | ||
}); |