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

fix tests for IE11 #20

Merged
merged 1 commit into from
Oct 24, 2018
Merged
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
35 changes: 28 additions & 7 deletions can-queues-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,11 +158,15 @@ if ( System.env.indexOf( 'production' ) < 0 ) {

canDev.log = function ( area, name ) {
QUnit.equal( "Test enqueuing:", area );
QUnit.equal( "fnName", name );
if (name) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought we would just skip tests that were about debugging features. Looks fine though.

QUnit.equal( "fnName", name );
}

canDev.log = function ( area, name ) {
QUnit.equal( "Test running :", area );
QUnit.equal( "fnName", name );
if (name) {
QUnit.equal( "fnName", name );
}
};
};

Expand All @@ -183,17 +187,28 @@ if ( System.env.indexOf( 'production' ) < 0 ) {
};
}

function setFnName(fn, fnName) {
if (!fn.name) {
fn.name = fnName;
}
}

var callbackOrder = [];
var map, fullName, mapFullName;

// var map = new DefineMap( {first: "Justin", last: "Meyer", fullName: ""}); //map:1

function derivedChild_queueUpdate () {
callbackOrder.push( "derivedChild_queueUpdate" );
fullName.queueUpdate();
}
setFnName(derivedChild_queueUpdate, 'derivedChild_queueUpdate');


map = {
name: "map",
notifyHandlers: [
function derivedChild_queueUpdate () {
callbackOrder.push( "derivedChild_queueUpdate" );
fullName.queueUpdate();
}
derivedChild_queueUpdate
],
dispatch: function () {
callbackOrder.push( "map.dispatch" );
Expand Down Expand Up @@ -231,12 +246,18 @@ if ( System.env.indexOf( 'production' ) < 0 ) {
]
};

setFnName(fullName.queueUpdate, "queueUpdate");
setFnName(fullName.update, "update");
setFnName(fullName.mutateHandlers[0], 'fullName_setFullNameProperty');



mapFullName = {
name: "map.fullName",
mutateHandlers: [function mapFullName_handler () {
callbackOrder.push( "gc1_eventHandler_writableChild_dispatch" );
var stack = queues.stack();

setFnName(this.mutateHandlers[0], "mapFullName_handler");
QUnit.deepEqual( stack.map( function ( task ) {
return task.meta.stack.name + " " +task.context.name + " " +
task.fn.name;
Expand Down