Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Landscaper: QUnit2 upgrade #37

Merged
merged 2 commits into from
May 24, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package-lock=false
23 changes: 12 additions & 11 deletions can-define-stream-kefir_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ var poll = function poll(fn, callback, timeout, interval) {

QUnit.module('can-define-stream-kefir');

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 All @@ -48,14 +49,14 @@ 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 @@ -115,7 +116,7 @@ QUnit.test("Test if streams are memory safe", function(assert) {
);
});

test('Keep track of change counts on stream', function(){
QUnit.test('Keep track of change counts on stream', function(assert) {

var count;

Expand All @@ -138,7 +139,7 @@ test('Keep track of change counts on stream', function(){

//this increases the count.. should it?
me.on("fullNameChangeCount", function(ev, newVal){
QUnit.equal(newVal, count, "Count should be " + count);
assert.equal(newVal, count, "Count should be " + count);
});

count = 2;
Expand All @@ -150,7 +151,7 @@ test('Keep track of change counts on stream', function(){
});


test('Update map property based on stream value', function() {
QUnit.test('Update map property based on stream value', function(assert) {
var expected;
var Person = DefineMap.extend({
name: "string",
Expand All @@ -166,7 +167,7 @@ test('Update map property based on stream value', function() {
var me = new Person({name: "James"});

me.on("lastValidName", function(lastValid){
QUnit.equal(lastValid.target.name, expected, "Updated name to " + expected);
assert.equal(lastValid.target.name, expected, "Updated name to " + expected);
});

me.name = "JamesAtherton";
Expand All @@ -181,7 +182,7 @@ test('Update map property based on stream value', function() {

});

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

var People = DefineList.extend({});
Expand All @@ -196,7 +197,7 @@ test('Stream on DefineList', function() {
var stream = people.stream('length');

stream.onValue(function(event) {
QUnit.equal(event.args[0], expectedLength, 'List size changed');
assert.equal(event.args[0], 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 @@ -45,7 +45,7 @@
"detect-cyclic-packages": "^1.1.0",
"jshint": "^2.9.1",
"steal": "^1.0.6",
"steal-qunit": "^1.0.0",
"steal-qunit": "^2.0.0",
"steal-tools": "^1.0.1",
"testee": "^0.9.0"
},
Expand Down