Publish to npm via
- npm publish
\ No newline at end of file
+ npm publish
<!DOCTYPE html>
<html>
<head>
- <meta charset="UTF-8" />
+ <meta charset="UTF-8">
<title>QUnit Test Suite - Canvas Addon</title>
- <link rel="stylesheet" href="../../qunit/qunit.css" type="text/css" media="screen">
- <script type="text/javascript" src="../../qunit/qunit.js"></script>
- <script type="text/javascript" src="qunit-canvas.js"></script>
- <script type="text/javascript" src="canvas-test.js"></script>
+ <link rel="stylesheet" href="../../qunit/qunit.css">
+ <script src="../../qunit/qunit.js"></script>
+ <script src="qunit-canvas.js"></script>
+ <script src="canvas-test.js"></script>
</head>
<body>
<div id="qunit"></div>
QUnit.notClose(sqrt2, 1.4142, 0.00001);
QUnit.notClose(Infinity, -Infinity, 5);
-});
\ No newline at end of file
+});
<!DOCTYPE html>
<html>
<head>
- <meta charset="UTF-8" />
+ <meta charset="UTF-8">
<title>QUnit Test Suite - Close Enough Addon</title>
- <link rel="stylesheet" href="../../qunit/qunit.css" type="text/css" media="screen">
- <script type="text/javascript" src="../../qunit/qunit.js"></script>
- <script type="text/javascript" src="qunit-close-enough.js"></script>
- <script type="text/javascript" src="close-enough-test.js"></script>
+ <link rel="stylesheet" href="../../qunit/qunit.css">
+ <script src="../../qunit/qunit.js"></script>
+ <script src="qunit-close-enough.js"></script>
+ <script src="close-enough-test.js"></script>
</head>
<body>
<div id="qunit"></div>
notClose: function(actual, expected, minDifference, message) {
QUnit.push(Math.abs(actual - expected) > minDifference, actual, expected, message);
}
-});
\ No newline at end of file
+});
<!doctype html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="UTF-8">
<title>QUnit SubsuiteRunner Test Suite</title>
-
- <link rel="stylesheet" href="../../qunit/qunit.css" type="text/css" media="screen">
+ <link rel="stylesheet" href="../../qunit/qunit.css">
<link rel="stylesheet" href="qunit-composite.css">
<script src="../../qunit/qunit.js"></script>
<script src="qunit-composite.js"></script>
-
<script>
- QUnit.testSuites([
- "../../test/index.html",
- "../canvas/canvas.html",
- "../close-enough/close-enough.html",
- "../step/step.html"
- ]);
+ QUnit.testSuites([
+ "../../test/index.html",
+ "../canvas/canvas.html",
+ "../close-enough/close-enough.html",
+ "../step/step.html"
+ ]);
</script>
</head>
<body>
<!DOCTYPE html>
<html>
- <head>
- <meta charset="UTF-8" />
- <title>Composite</title>
- </head>
- <body>
- <h1>Composite</h1>
- <h3>A QUnit Addon For Running Multiple Test Files</h3>
- <p>Composite is a QUnit addon that, when handed an array of
- files, will open each of those files inside of an iframe, run
- the tests and display the results as a single suite of QUnit
- tests.</p>
- <h4>Using Composite</h4>
- <p>To use Composite, setup a standard QUnit html page as you
- would with other QUnit tests. Remember to include composite.js
- and composite.css. Then, inside of either an external js file,
- or a script block call the only new method that Composite
- exposes, QUnit.testSuites().</p><p>QUnit.testSuites() is
- passed an array of test files to run as follows:</p>
- <pre>
+<head>
+ <meta charset="UTF-8">
+ <title>Composite</title>
+</head>
+<body>
+ <h1>Composite</h1>
+ <h3>A QUnit Addon For Running Multiple Test Files</h3>
+ <p>Composite is a QUnit addon that, when handed an array of
+ files, will open each of those files inside of an iframe, run
+ the tests and display the results as a single suite of QUnit
+ tests.</p>
+ <h4>Using Composite</h4>
+ <p>To use Composite, setup a standard QUnit html page as you
+ would with other QUnit tests. Remember to include composite.js
+ and composite.css. Then, inside of either an external js file,
+ or a script block call the only new method that Composite
+ exposes, QUnit.testSuites().</p><p>QUnit.testSuites() is
+ passed an array of test files to run as follows:</p>
+ <pre>
QUnit.testSuites([
- "test-file-1.html",
- "test-file-2.html",
- "test-file-3.html"
+"test-file-1.html",
+"test-file-2.html",
+"test-file-3.html"
]);
- </pre>
- <h4>Tests</h4>
- <p>
- <a href="composite-demo-test.html">Composite Demo</a>: A suite which demoes how Composite is bootstrapped and run.
- </p>
- </body>
+ </pre>
+ <h4>Tests</h4>
+ <p>
+ <a href="composite-demo-test.html">Composite Demo</a>: A suite which demoes how Composite is bootstrapped and run.
+ </p>
+</body>
</html>
-iframe.qunit-subsuite{
+iframe.qunit-subsuite {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
background: #fff;
-}
\ No newline at end of file
+}
## Alternatives
-If you're using Grunt, you should take a look at its [qunit task](https://github.com/cowboy/grunt/blob/master/docs/task_qunit.md). Or use [John Bender's grunt-junit plugin](https://github.com/johnbender/grunt-junit) to have the `qunit` task output JUnit-style XML, as this reporter does.
\ No newline at end of file
+If you're using Grunt, you should take a look at its [qunit task](https://github.com/cowboy/grunt/blob/master/docs/task_qunit.md). Or use [John Bender's grunt-junit plugin](https://github.com/johnbender/grunt-junit) to have the `qunit` task output JUnit-style XML, as this reporter does.
<!DOCTYPE html>
<html>
<head>
-<meta charset="UTF-8" />
-<title>QUnit Test Suite - JUnit report</title>
-<link rel="stylesheet" href="../../qunit/qunit.css" type="text/css" media="screen">
-<script type="text/javascript" src="../../qunit/qunit.js"></script>
-<script type="text/javascript" src="junitlogger.js"></script>
-<script type="text/javascript">
-QUnit.jUnitReport = function(data) {
- console.log(data.xml);
-};
+ <meta charset="UTF-8">
+ <title>QUnit Test Suite - JUnit report</title>
+ <link rel="stylesheet" href="../../qunit/qunit.css">
+ <script src="../../qunit/qunit.js"></script>
+ <script src="junitlogger.js"></script>
+ <script>
+ QUnit.jUnitReport = function(data) {
+ console.log(data.xml);
+ };
-module('Module 1');
+ module('Module 1');
-test("test 1", 2, function () {
- equal(1, 1, "Assert 1 = 1");
- equal(1, 2, "Assert fail 1 = 2");
-});
+ test("test 1", 2, function () {
+ equal(1, 1, "Assert 1 = 1");
+ equal(1, 2, "Assert fail 1 = 2");
+ });
-test("test 2", 3, function () {
- equal(1, 1, "Assert 1 = 1");
- equal(1, 2, "Assert fail 1 = 2");
- equal(1, 1, "Assert 1 = 1");
-});
+ test("test 2", 3, function () {
+ equal(1, 1, "Assert 1 = 1");
+ equal(1, 2, "Assert fail 1 = 2");
+ equal(1, 1, "Assert 1 = 1");
+ });
-module('Module 2');
+ module('Module 2');
-test("test 3", 2, function () {
- equal(1, 1, "Assert 1 = 1");
- equal(1, 2, "Assert fail 1 = 2");
-});
+ test("test 3", 2, function () {
+ equal(1, 1, "Assert 1 = 1");
+ equal(1, 2, "Assert fail 1 = 2");
+ });
-test("test 4", 3, function () {
- equal(1, 1, "Assert 1 = 1");
- equal(1, 2, "Assert fail 1 = 2");
- equal(1, 3, "Assert fail 1 = 3");
-});
-</script>
+ test("test 4", 3, function () {
+ equal(1, 1, "Assert 1 = 1");
+ equal(1, 2, "Assert fail 1 = 2");
+ equal(1, 3, "Assert fail 1 = 3");
+ });
+ </script>
</head>
<body>
<div id="qunit"></div>
this.pi(settings.xmldecl || 'xml version="1.0" encoding="UTF-8"');
}
-})();
\ No newline at end of file
+})();
phantomjs runner.js http://localhost/qunit/test
-If you're using Grunt, you should take a look at its [qunit task](https://github.com/cowboy/grunt/blob/master/docs/task_qunit.md).
\ No newline at end of file
+If you're using Grunt, you should take a look at its [qunit task](https://github.com/cowboy/grunt/blob/master/docs/task_qunit.md).
}
y();
x();
- });
\ No newline at end of file
+ });
* Check the sequence/order
*
* @example step(1); setTimeout(function () { step(3); }, 100); step(2);
- * @param Number expected The excepted step within the test()
+ * @param Number expected The excepted step within the test()
* @param String message (optional)
*/
step: function (expected, message) {
- this.config.current.step++; // increment internal step counter.
+ // increment internal step counter.
+ this.config.current.step++;
if (typeof message === "undefined") {
message = "step " + expected;
}
module('Step Addon');
+
test("step", 3, function () {
QUnit.step(1, "step starts at 1");
setTimeout(function () {
QUnit.step(2, "before the setTimeout callback is run");
stop();
});
+
test("step counter", 1, function () {
QUnit.step(1, "each test has its own step counter");
-});
\ No newline at end of file
+});
<!DOCTYPE html>
<html>
<head>
- <meta charset="UTF-8" />
+ <meta charset="UTF-8">
<title>QUnit Test Suite - Step Addon</title>
- <link rel="stylesheet" href="../../qunit/qunit.css" type="text/css" media="screen">
- <script type="text/javascript" src="../../qunit/qunit.js"></script>
- <script type="text/javascript" src="qunit-step.js"></script>
- <script type="text/javascript" src="step-test.js"></script>
+ <link rel="stylesheet" href="../../qunit/qunit.css">
+ <script src="../../qunit/qunit.js"></script>
+ <script src="qunit-step.js"></script>
+ <script src="step-test.js"></script>
</head>
<body>
<div id="qunit"></div>
<!DOCTYPE html>
<html>
<head>
+ <meta charset="UTF-8">
<title>QUnit Test Suite - Gabe Theme</title>
- <link rel="stylesheet" href="gabe.css" type="text/css" media="screen">
- <script type="text/javascript" src="../../qunit/qunit.js"></script>
- <script type="text/javascript" src="../../test/test.js"></script>
- <script type="text/javascript" src="../../test/deepEqual.js"></script>
+ <link rel="stylesheet" href="gabe.css">
+ <script src="../../qunit/qunit.js"></script>
+ <script src="../../test/test.js"></script>
+ <script src="../../test/deepEqual.js"></script>
</head>
<body>
<div id="qunit"></div>
<!DOCTYPE html>
<html>
- <head>
- <meta charset="utf-8">
- <title>QUnit Test Suite - Ninja Theme</title>
- <link rel="stylesheet" href="ninja.css" type="text/css" media="screen">
- <script type="text/javascript" src="../../qunit/qunit.js"></script>
- <script type="text/javascript" src="../../test/test.js"></script>
- <script type="text/javascript" src="../../test/deepEqual.js"></script>
- </head>
- <body>
- <div id="qunit"></div>
- <div id="qunit-fixture">test markup</div>
- </body>
+<head>
+ <meta charset="UTF-8">
+ <title>QUnit Test Suite - Ninja Theme</title>
+ <link rel="stylesheet" href="ninja.css">
+ <script src="../../qunit/qunit.js"></script>
+ <script src="../../test/test.js"></script>
+ <script src="../../test/deepEqual.js"></script>
+</head>
+<body>
+ <div id="qunit"></div>
+ <div id="qunit-fixture">test markup</div>
+</body>
</html>
<!DOCTYPE html>
<html>
<head>
+ <meta charset="UTF-8">
<title>QUnit Test Suite - NV Theme</title>
- <link rel="stylesheet" href="nv.css" type="text/css" media="screen">
- <script type="text/javascript" src="../../qunit/qunit.js"></script>
- <script type="text/javascript" src="../../test/test.js"></script>
- <script type="text/javascript" src="../../test/deepEqual.js"></script>
+ <link rel="stylesheet" href="nv.css">
+ <script src="../../qunit/qunit.js"></script>
+ <script src="../../test/test.js"></script>
+ <script src="../../test/deepEqual.js"></script>
</head>
<body>
<div id="qunit"></div>
}, 1000);
</script>
</body>
-</html>
\ No newline at end of file
+</html>
test("just a test", function() {
expect(1);
ok(true);
-});
\ No newline at end of file
+});
// TODO disable reordering for this suite!
-
var begin = 0,
moduleStart = 0,
moduleDone = 0,