Skip to content

Commit

Permalink
test: fix test helpers to address newlines issue on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
thetutlage committed Apr 14, 2020
1 parent c6c8e05 commit dddb219
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion test-helpers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import stringify from 'js-stringify'

export function normalizeNewLines (value: string) {
// eslint-disable-next-line @typescript-eslint/quotes
return value.replace(/out\s\+=\s"\\n"/g, `out += ${EOL === '\n' ? `"\\n"` : `"\\r\\n"`}`)
return value.replace(/\+=\s"\\n"/g, `+= ${EOL === '\n' ? `"\\n"` : `"\\r\\n"`}`)
}

export function normalizeFilename (basePath: string, value: string) {
Expand Down
2 changes: 1 addition & 1 deletion test/edge.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ test.group('Edge | regression', () => {
`,
})

assert.equal(edge.render('eval'), dedent`
assert.stringEqual(edge.render('eval'), dedent`
<script type="text/javascript">
var pl = /\+/g
</script>
Expand Down

0 comments on commit dddb219

Please sign in to comment.