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

Ie11 compat #139

Merged
merged 3 commits into from
Oct 22, 2018
Merged
Changes from 2 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
9 changes: 7 additions & 2 deletions can-observation_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -527,12 +527,17 @@ QUnit.test("a bound observation with no dependencies will keep calling its funct
QUnit.test("log observable changes", function(assert) {
var dev = require("can-log/dev/dev");
var name = simpleObservable("John Doe");
var fn = function() {};

assert.expect(3);
//assert.expect(3);
var log = dev.log;
dev.log = function() {
dev.log = log;
assert.equal(arguments[0], "Observation<>", "should use can.getName");
// Functions in IE11 dont have name property
// this test is ignored under IE11
if (fn.name) {
assert.equal(arguments[0], "Observation<>", "should use can.getName");
Copy link
Contributor

Choose a reason for hiding this comment

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

you could put expect(3) here

and an

else {
  assert.expect(2)
}

after ..

Copy link
Member Author

Choose a reason for hiding this comment

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

Done!

}
assert.equal(arguments[2], '"Charles Babbage"', "should use current value");
assert.equal(arguments[4], '"John Doe"', "should use previous value");
};
Expand Down