Skip to content
Browse files

Pass QUnit.assert to test callback (This style will be a new standard…

… for QUnit).
  • Loading branch information...
1 parent 885dad5 commit 388acc730681dc631d3ecf7f93ba9de1407d7fed @twada committed Dec 9, 2012
Showing with 11 additions and 11 deletions.
  1. +11 −11 test/sample_test.js
View
22 test/sample_test.js
@@ -1,23 +1,23 @@
-test("a basic test example", function() {
- ok( true, "this test is fine" );
+test("a basic test example", function(assert) {
+ assert.ok( true, "this test is fine" );
var value = "hello";
- equal( value, "hello", "We expect value to be hello" );
+ assert.equal( value, "hello", "We expect value to be hello" );
});
module("Module A");
-test("first test within module", function() {
- ok( true, "all pass" );
+test("first test within module", function(assert) {
+ assert.ok( true, "all pass" );
});
-test("second test within module", function() {
- ok( true, "all pass" );
+test("second test within module", function(assert) {
+ assert.ok( true, "all pass" );
});
module("Module B");
-test("some other test", function() {
+test("some other test", function(assert) {
expect(2);
- equal( true, false, "failing test" );
- equal( true, true, "passing test" );
-});
+ assert.equal( true, false, "failing test" );
+ assert.equal( true, true, "passing test" );
+});

0 comments on commit 388acc7

Please sign in to comment.
Something went wrong with that request. Please try again.