Я нашел пример создания поддельного сервера с помощью Sinon.
Вот код (1), (2).
Можно ли будет сделать то же самое, используя только Жасмин?
Если да. Как мне переписать код (1) и (2)?
(1)
beforeEach(function () {
this.server = sinon.fakeServer.create();
this.server.respondWith(
'GET',
Routing.generate('api_get_url') + '/' + this.model.get('id'),
JSON.stringify(this.fixtureResponse)
);
});
(2)
it('should the response not change', function() {
this.model.fetch();
this.server.respond();
expect(this.fixtureResponse).toEqual(this.model.attributes);
});