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 running npm run test with Node.js version 20.17.0, one of the tests in chain-api/src/types/dtos.spec.ts fails due to a slightly different wording of an error message.
To replicate, use nvm to manage multiple Node.js versions and attempt to build and test in v18 versus v20.
Failure when using Node.js 20.x:
FAIL chain-api chain-api/src/types/dtos.spec.ts
● should parse TestDtoWithArray
expect(received).toEqual(expected) // deep equality
Expected: "Unexpected end of JSON input"
Received: "Unterminated string in JSON at position 16"
71 | expect(await getPlainOrError(TestDtoWithArray, invalid1)).toEqual(failedArrayMatcher);
72 | expect(await getPlainOrError(TestDtoWithArray, invalid2)).toEqual(failedArrayMatcher);> 73 | expect(await getPlainOrError(TestDtoWithArray, invalid3)).toEqual("Unexpected end of JSON input");
The test code expects an exact match on the error message string, and it appears that the wording is slightly different across Node.js major versions.
When running
npm run test
with Node.js version 20.17.0, one of the tests inchain-api/src/types/dtos.spec.ts
fails due to a slightly different wording of an error message.To replicate, use
nvm
to manage multiple Node.js versions and attempt to build and test in v18 versus v20.Failure when using Node.js 20.x:
The test code expects an exact match on the error message string, and it appears that the wording is slightly different across Node.js major versions.
https://github.com/GalaChain/sdk/blob/main/chain-api/src/types/dtos.spec.ts#L73
The text was updated successfully, but these errors were encountered: