We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug assertObjectMatch doesn't print whole object in assertion error
Steps to Reproduce
import { assertObjectMatch } from "https://deno.land/std@0.207.0/assert/mod.ts"; const x = { command: 'error', payload: { message: 'NodeNotFound', }, protocol: 'graph', }; const y = { protocol: 'graph', command: 'addgroup', payload: { graph: 'foo', metadata: { description: 'foo', }, name: 'somegroup', nodes: [ 'somenode', 'someothernode', ] } }; assertObjectMatch(x, y);
error: AssertionError: Values are not equal. [Diff] Actual / Expected { + command: "addgroup", + payload: { + graph: "foo", + metadata: { + description: "foo", + }, + name: "somegroup", + nodes: { + "0": "somenode", + "1": "someothernode", + }, + }, - command: "error", - payload: {}, protocol: "graph", } throw new AssertionError(message); ^ at assertEquals (https://deno.land/std@0.204.0/assert/assert_equals.ts:53:9) at assertObjectMatch (https://deno.land/std@0.204.0/assert/assert_object_match.ts:83:10) at assertOutputMatchesExpected (file:///home/tom/Code/code9/deno/c9-fbp/src/runtime.test.ts:101:3) at eventLoopTick (ext:core/01_core.js:183:11) at async Object.<anonymous> (file:///home/tom/Code/code9/deno/c9-fbp/src/runtime.test.ts:522:13) at async Function.runTest (https://deno.land/std@0.204.0/testing/_test_suite.ts:358:7) at async Function.runTest (https://deno.land/std@0.204.0/testing/_test_suite.ts:346:9) at async Function.runTest (https://deno.land/std@0.204.0/testing/_test_suite.ts:346:9) at async Function.runTest (https://deno.land/std@0.204.0/testing/_test_suite.ts:346:9) at async Function.runTest (https://deno.land/std@0.204.0/testing/_test_suite.ts:346:9)
Expected behavior Payload in the error to be filled.
Environment
The text was updated successfully, but these errors were encountered:
Thanks for reporting.
payload: { },
part looks missing the property message: 'NodeNotFound'
message: 'NodeNotFound'
Sorry, something went wrong.
Yes, it will miss any property :)
std/assert
No branches or pull requests
Describe the bug
assertObjectMatch doesn't print whole object in assertion error
Steps to Reproduce
Expected behavior
Payload in the error to be filled.
Environment
deno 1.37.2 (release, x86_64-unknown-linux-gnu)
v8 11.8.172.13
typescript 5.2.2
The text was updated successfully, but these errors were encountered: