MCPcopy Create free account
hub / github.com/Starcounter-Jack/JSON-Patch / verifyObjectStructure

Function verifyObjectStructure

test/spec/esbuild/importSpec.src.js:25–43  ·  view source on GitHub ↗
(obj)

Source from the content-addressed store, hash-verified

23});
24
25function verifyObjectStructure(obj) {
26 expect(typeof obj).withContext("result from import should be an object").toEqual("object");
27 expect(typeof obj).withContext("result from import should not be a function").not.toEqual("function");
28 expect(obj.applyOperation).withContext("applyOperation should be a method within the object").toBeDefined();
29 expect(obj.applyPatch).withContext("applyPatch should be a method within the object").toBeDefined();
30 expect(obj.applyReducer).withContext("applyReducer should be a method within the object").toBeDefined();
31 expect(obj.getValueByPointer).withContext("getValueByPointer should be a method within the object").toBeDefined();
32 expect(obj.validate).withContext("validate should be a method within the object").toBeDefined();
33 expect(obj.validator).withContext("validator should be a method within the object").toBeDefined();
34 expect(obj._areEquals).withContext("_areEquals should be a method within the object").toBeDefined();
35 expect(obj.JsonPatchError).withContext("JsonPatchError should be a method within the object").toBeDefined();
36 expect(obj.deepClone).withContext("deepClone should be a method within the object").toBeDefined();
37 expect(obj.escapePathComponent).withContext("escapePathComponent should be a method within the object").toBeDefined();
38 expect(obj.unescapePathComponent).withContext("unescapePathComponent should be a method within the object").toBeDefined();
39 expect(obj.unobserve).withContext("unobserve should be a method within the object").toBeDefined();
40 expect(obj.observe).withContext("observe should be a method within the object").toBeDefined();
41 expect(obj.generate).withContext("generate should be a method within the object").toBeDefined();
42 expect(obj.compare).withContext("compare should be a method within the object").toBeDefined();
43}

Callers 1

importSpec.src.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected