WBE_Praktikum_4/jasmine_demo/spec/parse-to-proto-Specs.js

15 lines
466 B
JavaScript
Raw Normal View History

2022-10-20 12:53:02 +02:00
describe("parseToProto", function() {
var obj;
beforeEach(function() {
let proto = {category: "animal"}
});
it("should have category, type, name and age attribute", function() {
let obj = parseToProto('{"type": "cat", "name":"Mimi","age":3}', proto)
expect("animal").toEqual(obj.category);
expect("cat").toEqual(obj.type);
expect("Mimi").toEqual(obj.name);
expect(3).toEqual(obj.age);
});
});