Skip to content

Commit

Permalink
Merge pull request #139 from canjs/ie11-compat
Browse files Browse the repository at this point in the history
Ie11 compat
  • Loading branch information
cherifGsoul authored Oct 22, 2018
2 parents 1e735fc + 006561b commit 02dc2a4
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion can-observation_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -527,12 +527,20 @@ 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);

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");
} else {
assert.expect(2);
}
assert.equal(arguments[2], '"Charles Babbage"', "should use current value");
assert.equal(arguments[4], '"John Doe"', "should use previous value");
};
Expand Down

0 comments on commit 02dc2a4

Please sign in to comment.