Skip to content

Commit

Permalink
Merge pull request #17 from canjs/landscaper/qunit2
Browse files Browse the repository at this point in the history
Landscaper: QUnit2 upgrade
  • Loading branch information
cherifGsoul authored May 26, 2019
2 parents 43d8181 + 01556ad commit 4022341
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
18 changes: 9 additions & 9 deletions can-log-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,33 +7,33 @@ if(typeof console !== "undefined") {

QUnit.module("can-log");

QUnit.test("log.log works", function(){
QUnit.expect(1);
QUnit.test("log.log works", function(assert) {
assert.expect(1);
var log = console.log;
console.log = function(msg){
QUnit.equal(msg, "it worked");
assert.equal(msg, "it worked");
console.log = log;
};

canLog.log("it worked");
});

QUnit.test("log.warn works", function(){
QUnit.expect(1);
QUnit.test("log.warn works", function(assert) {
assert.expect(1);
var warn = console.warn;
console.warn = function(msg){
QUnit.equal(msg, "it worked");
assert.equal(msg, "it worked");
console.warn = warn;
};

canLog.warn("it worked");
});

QUnit.test("log.error works", function(){
QUnit.expect(1);
QUnit.test("log.error works", function(assert) {
assert.expect(1);
var error = console.error;
console.error = function(msg){
QUnit.equal(msg, "an error");
assert.equal(msg, "an error");
console.error = error;
};

Expand Down
10 changes: 5 additions & 5 deletions dev/dev-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ var dev = require('./dev');

QUnit.module("can-log/dev");

QUnit.test("stringify", function() {
strictEqual(dev.stringify(undefined), "undefined");
QUnit.test("stringify", function(assert) {
assert.strictEqual(dev.stringify(undefined), "undefined");

ok(/\"foo\": undefined/.test(dev.stringify({ foo: undefined })));
assert.ok(/\"foo\": undefined/.test(dev.stringify({ foo: undefined })));

ok(/\"bar\": undefined/.test(dev.stringify({ foo: undefined,
assert.ok(/\"bar\": undefined/.test(dev.stringify({ foo: undefined,
bar: undefined })));

ok(/\"7\": undefined/.test(dev.stringify({ foo: undefined,
assert.ok(/\"7\": undefined/.test(dev.stringify({ foo: undefined,
7: undefined, bar: undefined })));
});
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"generator-donejs": "^3.3.0",
"jshint": "^2.9.1",
"steal": "^2.2.1",
"steal-qunit": "^1.0.1",
"steal-qunit": "^2.0.0",
"steal-tools": "^2.2.1",
"testee": "^0.9.0"
},
Expand Down

0 comments on commit 4022341

Please sign in to comment.