The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,862 other subscribers

Archive for January 29th, 2026

JavaScript unit testing in the browser without Node.js: Getting Started | QUnit

Posted by jpluimers on 2026/01/29

A cool way to unit-test JavaScript code on the browser side is [Wayback/Archive] Getting Started | QUnit:

To get started with QUnit in the browser, create a simple HTML file called test.html and include the following markup:

<!DOCTYPE html>
<meta charset="utf-8">
<title>Test Suite</title>
<link rel="stylesheet" href="https://code.jquery.com/qunit/qunit-2.19.4.css">
<body>
  <div id="qunit"></div>
  <div id="qunit-fixture"></div>
  <script src="https://code.jquery.com/qunit/qunit-2.19.4.js"></script>
</body>

That’s all the markup you need to start writing tests. Note that this loads the library from the jQuery CDN.

I was so glad to find QUnit via the below links as I unconsciously wanted such a thing for a very very long time.

You can either run it locally or remotely or from the jQuery CDN as both it

  • is a Node.js module so the source files are all available on the jQuery CDN
  • it does not require the Node.js to load so it can run from any location you want (that CDN, locally or another on-line location)

Read the rest of this entry »

Posted in Chrome, Development, Edge, Firefox, JavaScript/ECMAScript, Power User, Scripting, Software Development, Web Browsers, Web Development | Leave a Comment »