Fix row.spec.ts
This commit is contained in:
parent
51b12645c5
commit
28d3c18aba
|
@ -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}\\]$`)
|
||||||
|
|
Loading…
Reference in New Issue