我正在尝试理解qunit测试
为什么这个测试失败了?如果我比较每个属性,都是一样的......
test("Get model equal", function () {
function getModel() {
function myModel() {
this.name = "";
this.address = "";
this.phone = "";
}
return new myModel();
}
var model1 = getModel();
var model2 = getModel();
equal(model1, model2);
});
test("Get model deepEqual", function () {
function getModel() {
function myModel() {
this.name = "";
this.address = "";
this.phone = "";
}
return new myModel();
}
var model1 = getModel();
var model2 = getModel();
deepEqual(model1, model2);
});