Get started with qunit CDN

MIT licensed

QUnit: Simple, modular JS unit testing framework.

Tags:
  • framework
  • toolkit
  • unit tests

Stable version

Copied!

How to start using qunit CDN


<!DOCTYPE html>
<html>
<head>
  <meta name="description" content="QUnit Test Example">
  <script src="https://cdn.cdnhub.io/qunit/2.20.1/qunit.min.js"></script>
  <title>Get started with qunit CDN - cdnhub.io</title>
  <style>
    #qunit-fixture { width: 960px; margin: 0 auto; }
  </style>
</head>
<body>
  <div id="qunit-fixture">
    <div id="qunit"></div>
    <div id="qunit-test-runner-logs"></div>
  </div>

  <script>
    QUnit.config.autostart = false;

    QUnit.test("Simple QUnit Test", function(assert) {
      assert.equal(1 + 1, 2, "One plus one equals two");
    });

    document.addEventListener("DOMContentLoaded", function() {
      QUnit.start();
    });
  </script>
</body>
</html>
Copied!
Copied!
Copied!
Copied!

All versions