Skip to content

Commit

Permalink
Merge pull request #72 from canjs/landscaper/qunit2
Browse files Browse the repository at this point in the history
Landscaper: QUnit2 upgrade
  • Loading branch information
cherifGsoul authored May 24, 2019
2 parents fdf4535 + d8c873b commit 12721ab
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
15 changes: 8 additions & 7 deletions can-define-stream_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ var poll = function poll(fn, callback, timeout, interval) {
})();
};

test('Stream behavior on multiple properties with merge', 8, function() {
QUnit.test('Stream behavior on multiple properties with merge', function(assert) {
assert.expect(8);

var expectedNewVal,
expectedOldVal,
Expand Down Expand Up @@ -125,15 +126,15 @@ test('Stream behavior on multiple properties with merge', 8, function() {

map.foo = 'foo-1';

QUnit.equal( map.baz, undefined, "read value before binding");
assert.equal( map.baz, undefined, "read value before binding");

map.on("baz", function(ev, newVal, oldVal){
QUnit.equal(newVal, expectedNewVal, caseName+ " newVal");
QUnit.equal(oldVal, expectedOldVal, caseName+ " oldVal");
assert.equal(newVal, expectedNewVal, caseName+ " newVal");
assert.equal(oldVal, expectedOldVal, caseName+ " oldVal");
});


QUnit.equal( map.baz, 'bar', "read value immediately after binding");
assert.equal( map.baz, 'bar', "read value immediately after binding");

caseName = "setting foo";
expectedOldVal = 'bar';
Expand Down Expand Up @@ -218,7 +219,7 @@ QUnit.test('Test if streams are memory safe', function(assert) {
);
});

test('Stream on DefineList', function() {
QUnit.test('Stream on DefineList', function(assert) {
var expectedLength;

var PeopleList = DefineList.extend({});
Expand Down Expand Up @@ -247,7 +248,7 @@ test('Stream on DefineList', function() {

expectedLength = 2;
stream.onValue(function(ev, val) {
QUnit.equal(val, expectedLength, 'List size changed');
assert.equal(val, expectedLength, 'List size changed');
});

expectedLength = 3;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"generator-donejs": "^1.0.5",
"jshint": "^2.9.1",
"steal": "^1.2.8",
"steal-qunit": "^1.0.1",
"steal-qunit": "^2.0.0",
"steal-tools": "^1.1.2",
"testee": "^0.9.0"
},
Expand Down

0 comments on commit 12721ab

Please sign in to comment.