Skip to content

Commit

Permalink
Revert "backslash requires escape character"
Browse files Browse the repository at this point in the history
This reverts commit be0a708.
  • Loading branch information
Ian Brown authored and Ian Brown committed Dec 3, 2018
1 parent 5a541f4 commit 6b96c75
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/lib/generate-screenshot-file-path-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,19 @@ describe('generateScreenshotFilePath', () => {

it('should generate a file path by using the basePath parameter, and the current test name and module', () => {
expect(generateScreenshotFilePath(getNightwatchClient(), 'baseline'))
.toEqual(`${process.cwd()}\\baseline\\visualizations\\bar-plots.png`)
.toEqual(`${process.cwd()}/baseline/visualizations/bar-plots.png`)
})

it('should generate a file path by using the basePath parameter, and a custom filename', () => {
expect(generateScreenshotFilePath(getNightwatchClient(), 'baseline', 'foo-test'))
.toEqual(`${process.cwd()}\\baseline\\visualizations\\foo-test.png`)
.toEqual(`${process.cwd()}/baseline/visualizations/foo-test.png`)
})

it('should pass the correct filename to the custom naming function', () => {
customNameFn = (client, basePath, fileName) =>
path.join(process.cwd(), basePath, client.currentTest.module, `custom-${fileName}`)

expect(generateScreenshotFilePath(getNightwatchClient(), 'baseline', 'foo-test'))
.toEqual(`${process.cwd()}\\baseline\\visualizations\\custom-foo-test.png`)
.toEqual(`${process.cwd()}/baseline/visualizations/custom-foo-test.png`)
})
})

0 comments on commit 6b96c75

Please sign in to comment.