Skip to content

docs/Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ source "https://rubygems.org"
22
ruby RUBY_VERSION
33

44
# To apply changes, run `bundle update`.
5-
gem "jekyll-theme-amethyst", "2.8.2", group: :jekyll_plugins
5+
gem "jekyll-theme-amethyst", "2.9.0", group: :jekyll_plugins
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
layout: post
3+
title: "QUnit 1.11 - A Look Back (and Forth)"
4+
author: jzaefferer
5+
tags:
6+
- feature
7+
---
8+
9+
Earlier this week, we released a new version of [QUnit](http://qunitjs.com/), jQuery's solution for unit testing JavaScript. Along with some details on the new release, I wanted to take this opportunity to tell you a bit more about QUnit, where it came from and where it is going. [I'm also looking for your input](https://docs.google.com/spreadsheet/viewform?formkey=dDBzQl9TWmQzbDdXS08wMTBuLTlObXc6MQ#gid=0), to help us shape the future of JavaScript testing.
10+
11+
## New in 1.11
12+
13+
The most visible change (aside from our new purple logo) is a runtime display for individual tests. Before, QUnit would show you how long it took to run a full test suite. Now it'll also show individual times for each test, making it easy to spot slow tests in your test suite. Since it's useful to have unit tests finish within seconds, tuning tests now becomes a bit easier.
14+
15+
Other changes are mostly bug fixes to built-in features, and various improvements to [add-ons](http://qunitjs.com/addons/). There's [a new theme](http://jquery.github.com/qunit/addons/themes/ninja.html), a overhaul of the [PhantomJS add-on](https://github.com/jquery/qunit/tree/master/addons/phantomjs) to use its [callback system](https://github.com/ariya/phantomjs/wiki/API-Reference#wiki-webpage-onCallback) and more. Check out the [changelog](https://github.com/jquery/qunit/blob/v1.11.0/History.md) for a full list of changes.
16+
17+
## QUnit's Evolution
18+
19+
Unlike jQuery UI and jQuery Mobile, QUnit doesn't have a code dependency on jQuery, it just happens to be developed as a jQuery Foundation project. How did that happen? It all started a long time ago, but in a galaxy pretty close by. Back in 2006, this guy named John was working on jQuery and wrote his own little unit test runner, since there wasn't much to start with. Two years later, John and I figured that this test runner would be useful as a standalone tool, and it got the name QUnit, as a mashup of jQuery and [JUnit](http://junit.org/). It lived in the same SVN repository as jQuery itself, along with a few pages on the jQuery wiki.
20+
21+
In 2009, we moved it to [its own GitHub repository](https://github.com/jquery/qunit) and rewrote QUnit to get rid of the dependency on jQuery. Until October 2011, QUnit was just updated in master, without versioned releases, which kind of worked, but also caused maintenance and dependency headaches. I finally tagged 1.0.0, along with regular releases since then. Recently, QUnit got its own [website](http://qunitjs.com/) and [API reference](http://api.qunitjs.com/).
22+
23+
## Moving Forward
24+
25+
Today QUnit is used not only to test jQuery Core, jQuery UI and jQuery Mobile, but many other other projects as well. One notable example is [Ember.js](http://emberjs.com/). Those guys don't get tired of telling me how great QUnit is, putting emphasis on the reliability. We'd like to find out more about how developers are using QUnit, so if you're using QUnit (or planning to), please take a few minutes to [complete this brief survey](https://docs.google.com/spreadsheet/viewform?formkey=dDBzQl9TWmQzbDdXS08wMTBuLTlObXc6MQ#gid=0).
26+
27+
From the ~50 answers we've received so far, it's clear that people use QUnit since it's so easy to get started with, and we certainly intend to keep it that way. It's also clear that a lot of people are looking for tools and guides on integrating QUnit in [CI](http://en.wikipedia.org/wiki/Continuous_integration) tools like [Jenkins](http://jenkins-ci.org/), which is also something we're planning to work on. Along with that comes a heavy refactoring of the QUnit codebase, which currently lives in a single JS file (and a sister CSS file). We're [going to split the codebase](https://github.com/jquery/qunit/issues/378) into a few modules, which should help future maintenance and make it easier to integrate other libraries. This will allow us to improve our diff implementation, for instance.
28+
29+
If you're interested in following future QUnit updates, [follow @qunitjs on Twitter](https://twitter.com/qunitjs) and watch the [project on GitHub](https://github.com/jquery/qunit).
30+
31+
-----
32+
33+
_Originally published on [blog.jquery.com](https://blog.jquery.com/2013/01/24/qunit-1-11-release-a-look-back-and-forth/)._
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
---
2+
layout: post
3+
title: "QUnit 1.16 Release and Roadmap"
4+
author: jzaefferer
5+
tags:
6+
- feature
7+
---
8+
9+
We've just released QUnit 1.16, an important milestone for the project. This release introduces several new APIs that will become the default in QUnit 2.0. To help migrate to these APIs, you can start using them today in 1.16. Our 2.x upgrade guide provides all the details you need to change your existing test suite to the new APIs.
10+
11+
Here's a quick overview of the new APIs:
12+
13+
```js
14+
QUnit.test('assert.async() test', function (assert) {
15+
var done = assert.async();
16+
var input = $('#test-input').focus();
17+
setTimeout(function () {
18+
assert.equal(document.activeElement, input[0], 'Input was focused');
19+
done();
20+
});
21+
});
22+
```
23+
24+
You still define tests by calling QUnit.test and passing a name and a callback. The callback receives a `assert` argument that contains all assertion methods. The [`assert.async()`](https://api.qunitjs.com/async/) method is brand new, replacing the old `stop()` method. The returned callback, here named `done` is later called when the test is finished, replacing the old `start()` method.
25+
26+
In addition, QUnit 1.16 contains several improvements and new features:
27+
28+
* [Promise support](https://api.qunitjs.com/QUnit.test/): As an enhancement for the async control, test blocks are now Promise aware, meaning QUnit will wait for the test to resolve with the pass or fail statement.
29+
* QUnit asynchronous tests can also now be defined using the new `var done = assert.async()` method instead of the old `stop()`/`start()`, making them specific to the test block.
30+
* [QUnit.skip](https://api.qunitjs.com/QUnit.skip/): This method can be used to define tests that aren't executed, as placeholders or to temporarily disable an existing test (instead of commenting it out). The skipped test is still displayed in the HTML reporter, marked prominently as "SKIPPED".
31+
* `testId` URL parameter: When clicking the "Rerun" link for a single test, a hash of the test name is now used to reference the test, called `testId`, instead of the previous `testNumber`. Using a hash makes sure that the order of tests can change, and QUnit will still rerun the same test you've selected before.
32+
* [CommonJS exports](https://github.com/jquery/qunit/blob/1.16.0/test/rhino-test.js): QUnit now also looks for a `exports` object and uses that to export itself, making QUnit usable on Rhino with the `-require` option.
33+
* There are a few more minor changes. For a full list, [check out the changelog](https://github.com/jquery/qunit/blob/1.16.0/History.md).
34+
35+
## Roadmap
36+
37+
For future releases, we have several improvements planned as well:
38+
39+
### Standardized reporter interface
40+
41+
Currently integration of any unit testing library into other tools like PhantomJS or browserstack-runner or Karma requires custom integration code, a combination of library and tools. We've started an effort to create a standard reporter interface that all testing libraries could implement, called [js-reporters](https://github.com/js-reporters/js-reporters/), to be consumed by those tools. Coordinating between the various projects and getting them to agree on and implement a common API takes time, but will yield better testing infrastructure for everyone.
42+
43+
### Better diff output
44+
45+
When writing unit tests that compare objects with deep structures or many properties, like Ember models or Moment instances, the current diff output is slow and inefficient. There are also comparisons where the diff is hard to read. Replacing the diff library and implementing custom optimizations, like only showing diffs for leafs in big objects, will make QUnit's HTML reporter even more developer friendly. We have [a list of all diff-related issues](https://github.com/jquery/qunit/labels/diff).
46+
47+
### Better support for writing custom assertions
48+
49+
Custom assertions are a powerful method of abstraction in test suites. They are currently underused. We want to [investigate better APIs](https://github.com/jquery/qunit/issues/533) for writing custom assertions, along with better documentation of existing and new APIs.
50+
51+
### Support for nested modules
52+
53+
Nesting modules, like Jasmine and Mocha support it, gives more flexibility in structuring test suites. There is [existing discussion and prototypes](https://github.com/jquery/qunit/pull/670), but no consensus on the API, yet.
54+
55+
For any breaking changes, we'll apply the same migration model that we're currently using. All backwards compatible changes will make it into the next minor release, any incompatible changes will be introduced with a migration layer in a minor release, removing the migration layer in the next major release.
56+
57+
## The QUnit Team
58+
59+
The QUnit team also would like to use this opportunity to introduce itself:
60+
61+
<figure>
62+
<a href="https://blog.jquery.com/wp-content/uploads/2014/12/DSC_10583.jpg"><img src="https://blog.jquery.com/wp-content/uploads/2014/12/DSC_10583-1024x507.jpg" alt="" width="584" height="289" /></a>
63+
<figcaption>At the jQuery Conference in Chicago, September 2014, from left to right: Jörn Zaefferer, Timo "Krinkle" Tijhof, James M. Greene, and Leonardo Balter.</figcaption>
64+
</figure>
65+
66+
-----
67+
68+
_Originally published on [blog.jquery.com](https://blog.jquery.com/2014/12/10/qunit-1-16-release-and-roadmap/)._
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
layout: post
3+
title: "Link: jQuery Foundation Project Updates"
4+
author: jzaefferer
5+
tags:
6+
- link
7+
---
8+
9+
From [jQuery Foundation Project Updates](https://blog.jquery.com/2015/07/30/jquery-foundation-project-updates/), blog.jquery.com:
10+
11+
> [The latest release, 1.18.0]({% post_url 2015-04-03-qunit-1-18-0 %}), made a lot of improvements to the HTML reporter, making it more efficient to debug failures. For example, a new diff algorithm makes it easier to spot the difference in failed expected/actual assertions.
12+
>
13+
> We’re currently working on the [js-reporters](https://github.com/js-reporters/js-reporters/) project, which QUnit will implement, along with hopefully many other JavaScript testing frameworks and tools. The goal is to standardize an API with events and event data for test runners. A tool like Karma could then adopt a single interface instead of having to support each testing tool individually.
14+
>
15+
> If you want to help moving QUnit along, [check out these issues](https://github.com/jquery/qunit/labels/help%20welcome).
16+
>
17+
> Links: [git](https://github.com/jquery/qunit), [meeting notes](http://meetings.jquery.org/category/testing/)

docs/about.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ QUnit should be opinionated with a lean API to support being easy-to-use, yet hi
2727

2828
Between API design, feature implementation, ticket triage, bug fixing, and everything else, there’s a lot of work that goes into QUnit, and all of it is done by volunteers. While we value all of our contributors, there are a few who contribute frequently, provide high-level direction for the project, and are responsible for its overall maintenance, and we recognize them below.
2929

30-
For a full list of contributors, see the [authors list](https://github.com/qunitjs/qunit/blob/master/AUTHORS.txt).
30+
For a full list of contributors, see the [authors list](https://github.com/qunitjs/qunit/blob/main/AUTHORS.txt).
3131

3232
### [Timo Tijhof](https://timotijhof.net/) - Project Lead
3333

34-
Timo is a senior engineer at [Wikimedia Foundation](https://www.wikimedia.org/) where he is on the [Architecture Committee](https://www.mediawiki.org/wiki/Architecture_committee), the technical committee that governs the integrity and stability of Wikimedia software projects. He has been contributing to jQuery Foundation projects since 2011, joined the QUnit Team in 2012, and became the project lead in mid-2020.
34+
Timo is a principal engineer at [Wikimedia Foundation](https://www.wikimedia.org/). He has been contributing to jQuery Foundation projects since 2011, joined the QUnit Team in 2012, and became the project lead in mid-2020.
3535

3636
### [Richard Gibson](https://twitter.com/gibson042)
3737

@@ -50,7 +50,7 @@ Jörn is a freelance web developer, consultant, and trainer, residing in Cologne
5050
* [James M. Greene](https://jamesmgreene.github.io/)
5151
* [John Resig](https://johnresig.com/)
5252
* [Kevin Partington](https://github.com/platinumazure)
53-
* [Leo Balter](https://twitter.com/leobalter)
53+
* [Leo Balter](https://twitter.com/leobalter) (project lead 2015-2017)
5454
* [Scott González](http://nemikor.com/)
5555

5656
## History

docs/blog/archive.md

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,4 @@ layout: posts-archive
33
title: Archive
44
---
55

6-
<!--
7-
8-
https://blog.jquery.com/2013/01/24/qunit-1-11-release-a-look-back-and-forth/
9-
10-
https://blog.jquery.com/2014/12/10/qunit-1-16-release-and-roadmap/
11-
12-
https://blog.jquery.com/2015/07/30/jquery-foundation-project-updates/
13-
14-
https://meetings.jquery.org/category/testing/
15-
2011-2016 Cross-post? Digest?
16-
17-
https://meetings.jquery.org/category/js-reporters/
18-
5x in 2016 Cross-post? Digest?
19-
20-
-->
6+
_See also [Meeting notes (2011-2016)](https://meetings.jquery.org/category/testing/) and [Meeting notes: js-reporters (2016)](https://meetings.jquery.org/category/js-reporters/) on meetings.jquery.org._

docs/blog/tag/link.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
layout: posts-tag
3+
tag: link
4+
title: Linked
5+
---

0 commit comments

Comments
 (0)