Fix row.spec.ts

This commit is contained in:
Sam Rose 2025-03-03 14:44:07 +00:00
parent 51b12645c5
commit 28d3c18aba
No known key found for this signature in database
1 changed files with 2 additions and 3 deletions

View File

@ -2515,15 +2515,14 @@ if (descriptions.length) {
csvString: exportedValue, csvString: exportedValue,
}) })
const stringified = (value: string) => const stringified = (value: string) => JSON.stringify(value)
JSON.stringify(value).replace(/"/g, "'")
const matchingObject = ( const matchingObject = (
key: string, key: string,
value: any, value: any,
isArray: boolean isArray: boolean
) => { ) => {
const objectMatcher = `{'${key}':'${value[key]}'.*?}` const objectMatcher = `{\"${key}\":\"${value[key]}\".*?}`
if (isArray) { if (isArray) {
return expect.stringMatching( return expect.stringMatching(
new RegExp(`^\\[${objectMatcher}\\]$`) new RegExp(`^\\[${objectMatcher}\\]$`)