finished
This commit is contained in:
@@ -1,15 +1,29 @@
|
||||
describe("parseToProto", function() {
|
||||
var obj;
|
||||
var parseToProto = require("../lib/parse-to-proto");
|
||||
var proto;
|
||||
|
||||
beforeEach(function() {
|
||||
let proto = {category: "animal"}
|
||||
proto = {category: "animal"};
|
||||
});
|
||||
|
||||
it("should have category, type, name and age attribute", function() {
|
||||
let obj = parseToProto('{"type": "cat", "name":"Mimi","age":3}', proto)
|
||||
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);
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user