-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
ignoreElements
input to API (#69)
* Generate pa11yOpts within getConfig * Update function signatures to expect options object * Add ignoreElements to manifest * Update signature of getPa11yOpts * Pass explicit pa11yOpts into runPa11y
- Loading branch information
Showing
5 changed files
with
23 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
const path = require('path') | ||
const { getPa11yOpts } = require('../../src/config') | ||
const filePath = path.relative(process.cwd(), path.join(__dirname, 'publishDir/index.html')) | ||
|
||
// actual test | ||
const pluginCore = require('../../src/pluginCore') | ||
test('runPa11y works', async () => { | ||
const results = await pluginCore.runPa11y({ | ||
htmlFilePaths: [filePath], | ||
build: { failBuild() {} }, | ||
htmlFilePaths: [filePath], | ||
pa11yOpts: await getPa11yOpts({}), | ||
}) | ||
expect(results).toMatchSnapshot() | ||
}) |