MCPcopy Create free account
hub / github.com/dolthub/doltgresql / assertEqualRows

Function assertEqualRows

testing/postgres-client-tests/node/helpers.js:27–39  ·  view source on GitHub ↗
(test, data)

Source from the content-addressed store, hash-verified

25}
26
27export function assertEqualRows(test, data) {
28 const expected = test.res;
29 const resultStr = JSON.stringify(data);
30 const result = JSON.parse(resultStr);
31 if (!assertQueryResult(test.q, expected, data, test.matcher)) {
32 console.log("Query:", test.q);
33 console.log("Results:", result);
34 console.log("Expected:", expected);
35 throw new Error("Query failed");
36 } else {
37 console.log("Query succeeded:", test.q);
38 }
39}
40
41export function assertQueryResult(q, expected, data, matcher) {
42 if (matcher) {

Callers 2

mainFunction · 0.90
runTestsFunction · 0.90

Calls 2

assertQueryResultFunction · 0.85
parseMethod · 0.80

Tested by

no test coverage detected