@@ -15,6 +15,7 @@ http://github.com/jquery/qunit
1515- the simplest API of the world, especially for asynchronous testing
1616- you can write tests in TDD or BDD style depending on your task and test type
1717- you can run the same tests in browser if there is no dependencies to node
18+ - generators support
1819
1920### Installation
2021
@@ -176,19 +177,19 @@ QUnit API and code which have to be tested are already loaded and attached to th
176177Some tests examples
177178
178179
179- test("a basic test example", function (assert ) {
180+ test("a basic test example", function () {
180181 ok(true, "this test is fine");
181182 var value = "hello";
182183 equal("hello", value, "We expect value to be hello");
183184 });
184185
185186 QUnit.module("Module A");
186187
187- test("first test within module", 1, function (assert ) {
188+ test("first test within module", 1, function () {
188189 ok(true, "a dummy");
189190 });
190191
191- test("second test within module", 2, function (assert ) {
192+ test("second test within module", 2, function () {
192193 ok(true, "dummy 1 of 2");
193194 ok(true, "dummy 2 of 2");
194195 });
@@ -202,7 +203,7 @@ Some tests examples
202203 }
203204 });
204205
205- test("some other test", function (assert ) {
206+ test("some other test", function () {
206207 expect(2);
207208 equal(true, false, "failing test");
208209 equal(true, true, "passing test");
@@ -215,11 +216,11 @@ Some tests examples
215216 }
216217 });
217218
218- test("this test is using shared environment", 1, function (assert ) {
219+ test("this test is using shared environment", 1, function () {
219220 deepEqual({ test: 123 }, this.options, "passing test");
220221 });
221222
222- test("this is an async test example", function (assert ) {
223+ test("this is an async test example", function () {
223224 expect(2);
224225 stop();
225226 setTimeout(function () {
@@ -229,6 +230,12 @@ Some tests examples
229230 }, 100);
230231 });
231232
233+ ### Generators support
234+
235+ test("my async test with generators", function* () {
236+ var data = yield asyncFn();
237+ equal(data, {a: 1}, 'generators work');
238+ });
232239
233240### Run tests
234241
0 commit comments