Skip to content

Commit fb92941

Browse files
fix(testing): drop template placeholders from mock error message for biome
1 parent 4930c2c commit fb92941

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

packages/testing/src/mocks/database.mock.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,9 @@ export function createMockSql() {
3434
if (encoder === undefined && Array.isArray(value)) {
3535
throw new Error(
3636
'sql.param(array) binds an array as one parameter, which fails under ' +
37-
'fetch_types: false (packages/db/db.ts). Use `IN ${arr}` or ' +
38-
'ARRAY[${sql.join(arr.map((v) => sql`${v}`), sql`, `)}]::text[].'
37+
'fetch_types: false (packages/db/db.ts). Interpolate the array directly ' +
38+
'for an expanded IN list, or build an ARRAY[...]::text[] constructor of ' +
39+
'scalar binds via sql.join.'
3940
)
4041
}
4142
if (encoder === undefined && value instanceof Date) {

0 commit comments

Comments
 (0)