Skip to content

Commit b309aa0

Browse files
Update unit test's result messages (#1812)
* update: unit test's result messages * update: unit test's result messages
1 parent 104c840 commit b309aa0

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

cli/api/commands/test.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,19 @@ async function runTest(
8383
const normalizedColumn = normalizeColumnName(column);
8484
const expectedValue = expectedResultRow[normalizedColumn];
8585
const actualValue = actualResultRow[normalizedColumn];
86+
// Null value check
87+
if (expectedValue === null && actualValue !== null) {
88+
rowMessages.push(
89+
`For row ${i} and column "${column}": expected null, but saw "${actualValue}".`
90+
);
91+
break;
92+
}
93+
if (expectedValue !== null && actualValue === null) {
94+
rowMessages.push(
95+
`For row ${i} and column "${column}": expected "${expectedValue}", but saw null.`
96+
);
97+
break;
98+
}
8699
if (typeof expectedValue !== typeof actualValue) {
87100
rowMessages.push(
88101
`For row ${i} and column "${column}": expected type "${typeof expectedValue}", but saw type "${typeof actualValue}".`

0 commit comments

Comments
 (0)