Пример #1
0
 it('should fill the return value with its properties', function () {
     var model = new Model({ x: 1 });
     var value = model.valueOf();
     expect(value.x).toBe(1);
 });
Пример #2
0
 it('should not return its stored context directly', function () {
     var model = new Model({ x: 1 });
     var value = model.valueOf();
     model.set('y', 1);
     expect(value.y).toBeUndefined();
 });
Пример #3
0
 it('should return a plain object', function () {
     var model = new Model({ x: 1 });
     var value = model.valueOf();
     expect(value).toBeOfType('object');
 });