Skip to content

Commit

Permalink
fixing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
moschel committed Apr 29, 2014
1 parent ef42992 commit 3e255e4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
8 changes: 0 additions & 8 deletions map/map_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,13 +207,5 @@ steal("can/map", "can/compute", "can/test", "can/list", function (undefined) {
equal(test.attr('my.newCount'), 1, 'falsey (1) value accessed correctly');
});

test('stuff', function(){

var MyMap = can.Map.extend();
var map = new MyMap();
map.attr("locations", [{id: 1, name: "Chicago"}, {id: 2, name: "LA"}]);
console.log(map.attr('locations')[0] instanceof MyMap); // true
})


});
6 changes: 5 additions & 1 deletion map/setter/setter_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ steal("can/map/setter", "can/test", function () {
var oldlog = can.dev.warn;
can.dev.warnTimeout = 10;
can.dev.warn = function (text) {
debugger;
ok(text, "got a message");
can.batch.stop(true);
can.dev.warn = oldlog;
Expand All @@ -106,12 +107,15 @@ steal("can/map/setter", "can/test", function () {

});

test('setter function does not warns if setter is called back quickly (#808)', function () {
test('setter function does not warn if setter is called back quickly (#808)', function () {
stop();
expect(1);
var oldlog = can.dev.warn;
can.dev.warnTimeout = 100;
var firstMsg = false;
can.dev.warn = function (text) {
// first warn is not the relevant message, there is a deprecation warning we need to ignore
if(!firstMsg) return;
ok(false, "got a message");
start();
};
Expand Down

0 comments on commit 3e255e4

Please sign in to comment.