Skip to content

Commit

Permalink
feat: Accept fixtureOutputName option for fixtures mode (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
Andarist authored and Kent C. Dodds committed Jun 4, 2018
1 parent cb230ec commit f3e1ad2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ function pluginTester(
pluginOptions,
tests,
fixtures,
fixtureOutputName = 'output',
filename,
...rest
} = {},
Expand All @@ -42,6 +43,7 @@ function pluginTester(
pluginOptions,
title: describeBlockTitle,
fixtures,
fixtureOutputName,
filename,
babel,
...rest,
Expand Down Expand Up @@ -211,6 +213,7 @@ function testFixtures({
pluginOptions,
title: describeBlockTitle,
fixtures,
fixtureOutputName,
filename,
babel,
...rest
Expand Down Expand Up @@ -241,7 +244,7 @@ function testFixtures({
.code.trim()

const output = fs
.readFileSync(path.join(fixtureDir, 'output.js'), 'utf8')
.readFileSync(path.join(fixtureDir, `${fixtureOutputName}.js`), 'utf8')
.trim()

assert.equal(actual, output, 'actual output does not match output.js')
Expand Down

0 comments on commit f3e1ad2

Please sign in to comment.