Skip to content

Commit

Permalink
style: fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
AriPerkkio committed May 4, 2022
1 parent 1c7c733 commit ba85bad
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/vitest/src/integrations/snapshot/port/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,13 +165,13 @@ export function prepareExpected(expected?: string) {
return match?.[1]?.length || 0
}

const startIdent = findStartIndent()
const startIndent = findStartIndent()

let expectedTrimmed = expected?.trim()

if (startIdent) {
if (startIndent) {
expectedTrimmed = expectedTrimmed
?.replace(new RegExp(`^${' '.repeat(startIdent)}`, 'gm'), '').replace(/ +}$/, '}')
?.replace(new RegExp(`^${' '.repeat(startIndent)}`, 'gm'), '').replace(/ +}$/, '}')
}

return expectedTrimmed
Expand Down

0 comments on commit ba85bad

Please sign in to comment.