Skip to content

Commit

Permalink
test: fix snapshot on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
develar committed Feb 22, 2017
1 parent 0be724d commit 3cb5b93
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/src/helpers/fileAssert.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ class Assertions {
m = m.substring(0, m.indexOf("\n"))
}

m = m.replace(/\((\/|\\)[^(]+(\/|\\)([^(\/\\]+)\)/g, `(<path>/$3)`)
m = m.replace(/"(\/|\\)[^"]+(\/|\\)([^"\/\\]+)"/g, `"<path>/$3"`)
m = m.replace(/'(\/|\\)[^']+(\/|\\)([^'\/\\]+)'/g, `'<path>/$3'`)
m = m.replace(/\((C:)?(\/|\\)[^(]+(\/|\\)([^(\/\\]+)\)/g, `(<path>/$4)`)
m = m.replace(/"(C:)?(\/|\\)[^"]+(\/|\\)([^"\/\\]+)"/g, `"<path>/$4"`)
m = m.replace(/'(C:)?(\/|\\)[^']+(\/|\\)([^'\/\\]+)'/g, `'<path>/$4'`)
}
expect(m).toMatchSnapshot()
}
Expand Down

0 comments on commit 3cb5b93

Please sign in to comment.