You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// When
const toSign = signatures.getPayloadToSign(obj);
// Then
expect(toSign).toEqual('{"a":3,"b":[{"x":4,"y":5,"z":6},7],"c":8}');
});
ERR:
(0 , json_stringify_deterministic_1.default) is not a function
TypeError: (0 , json_stringify_deterministic_1.default) is not a function
at serialize (/Users/lc/Documents/TsCode/01Example/tests/serialize.ts:19:19)
at Object.getPayloadToSign (/Users/lc/Documents/TsCode/01Example/tests/signatures.ts:33:19)
at Object. (/Users/lc/Documents/TsCode/01Example/tests/galasignature.spec.ts:26:35)
at Promise.then.completed (/Users/lc/Documents/TsCode/01Example/node_modules/jest-circus/build/utils.js:298:28)
at new Promise ()
at callAsyncCircusFn (/Users/lc/Documents/TsCode/01Example/node_modules/jest-circus/build/utils.js:231:10)
at _callCircusTest (/Users/lc/Documents/TsCode/01Example/node_modules/jest-circus/build/run.js:316:40)
at _runTest (/Users/lc/Documents/TsCode/01Example/node_modules/jest-circus/build/run.js:252:3)
at _runTestsForDescribeBlock (/Users/lc/Documents/TsCode/01Example/node_modules/jest-circus/build/run.js:126:9)
at _runTestsForDescribeBlock (/Users/lc/Documents/TsCode/01Example/node_modules/jest-circus/build/run.js:121:9)
at run (/Users/lc/Documents/TsCode/01Example/node_modules/jest-circus/build/run.js:71:3)
at runAndTransformResultsToJestFormat (/Users/lc/Documents/TsCode/01Example/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)
at jestAdapter (/Users/lc/Documents/TsCode/01Example/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)
at runTestInternal (/Users/lc/Documents/TsCode/01Example/node_modules/jest-runner/build/runTest.js:367:16)
at runTest (/Users/lc/Documents/TsCode/01Example/node_modules/jest-runner/build/runTest.js:444:34)
The text was updated successfully, but these errors were encountered:
Why chain-api/src/utils/signatures.spec.ts can not use?
it("should sort keys", () => {
// Given
const obj = { c: 8, b: [{ z: 6, y: 5, x: 4 }, 7], a: 3 };
ERR:
(0 , json_stringify_deterministic_1.default) is not a function
TypeError: (0 , json_stringify_deterministic_1.default) is not a function
at serialize (/Users/lc/Documents/TsCode/01Example/tests/serialize.ts:19:19)
at Object.getPayloadToSign (/Users/lc/Documents/TsCode/01Example/tests/signatures.ts:33:19)
at Object. (/Users/lc/Documents/TsCode/01Example/tests/galasignature.spec.ts:26:35)
at Promise.then.completed (/Users/lc/Documents/TsCode/01Example/node_modules/jest-circus/build/utils.js:298:28)
at new Promise ()
at callAsyncCircusFn (/Users/lc/Documents/TsCode/01Example/node_modules/jest-circus/build/utils.js:231:10)
at _callCircusTest (/Users/lc/Documents/TsCode/01Example/node_modules/jest-circus/build/run.js:316:40)
at _runTest (/Users/lc/Documents/TsCode/01Example/node_modules/jest-circus/build/run.js:252:3)
at _runTestsForDescribeBlock (/Users/lc/Documents/TsCode/01Example/node_modules/jest-circus/build/run.js:126:9)
at _runTestsForDescribeBlock (/Users/lc/Documents/TsCode/01Example/node_modules/jest-circus/build/run.js:121:9)
at run (/Users/lc/Documents/TsCode/01Example/node_modules/jest-circus/build/run.js:71:3)
at runAndTransformResultsToJestFormat (/Users/lc/Documents/TsCode/01Example/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)
at jestAdapter (/Users/lc/Documents/TsCode/01Example/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)
at runTestInternal (/Users/lc/Documents/TsCode/01Example/node_modules/jest-runner/build/runTest.js:367:16)
at runTest (/Users/lc/Documents/TsCode/01Example/node_modules/jest-runner/build/runTest.js:444:34)
The text was updated successfully, but these errors were encountered: