야 그래서 오늘은 재스민과 장난하고 있었고, 난이 간단한 Person 객체를 작성비교 객체
function Person() {}
Person.prototype.name = "Alex";
Person.prototype.age = 24;
여기 내 사양 테스트
describe("Person", function() {
var someone = new Person();
it('should be equal to other people', function() {
var another = {
name: "Joe",
age: 25,
};
expect(someone).toEqual(another);
});
});
이야 그러나 그것은 실패에} {예상 equal {name : 'Alex', age : 24} Jasmine의 toEqual 매처로 개체를 조작하면 안됩니까? 내가 여기서 뭔가를 놓치고 있니?
감사합니다.