-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
improvement(jest): add config to automate setup of a11y matchers
Add integration test package to test setup of a11y matcher
- Loading branch information
Mohan Raj Rajamanickam
committed
May 4, 2020
1 parent
c77f356
commit 2b18c4b
Showing
9 changed files
with
92 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,5 @@ | ||
{ | ||
"ignorePaths": ["node_modules/**", "package.json"], | ||
"ignoreWords": [ | ||
"assertAccessible", | ||
"doctoc", | ||
"CNCF", | ||
"SPDX", // license header | ||
"tsdoc" | ||
], | ||
"ignoreWords": ["assertAccessible", "doctoc", "CNCF", "integ", "SPDX", "tsdoc"], | ||
"ignoreRegExpList": ["ruleset"] | ||
} |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<!-- START doctoc generated TOC please keep comment here to allow auto update --> | ||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --> | ||
|
||
|
||
- [`test-integ`](#test-integ) | ||
|
||
<!-- END doctoc generated TOC please keep comment here to allow auto update --> | ||
|
||
# `test-integ` | ||
|
||
Private package for integration testing @sa11y packages |
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/* | ||
* Copyright (c) 2020, salesforce.com, inc. | ||
* All rights reserved. | ||
* SPDX-License-Identifier: BSD-3-Clause | ||
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause | ||
*/ | ||
|
||
describe('integration test @sa11y/jest', () => { | ||
it.skip('should have a11y matchers working with setup in jest.config.js', () => { | ||
// TODO(Fix) : Fails with TypeError: expect(...).toBeAccessible is not a function | ||
expect(document).toBeAccessible(); | ||
}); | ||
}); |
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/* | ||
* Copyright (c) 2020, salesforce.com, inc. | ||
* All rights reserved. | ||
* SPDX-License-Identifier: BSD-3-Clause | ||
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause | ||
*/ | ||
|
||
// eslint-disable-next-line @typescript-eslint/no-var-requires | ||
const { jestConfig } = require('@sa11y/jest'); | ||
|
||
module.exports = { | ||
...jestConfig, | ||
}; |
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"name": "@sa11y/test-integ", | ||
"version": "0.1.0", | ||
"private": true, | ||
"description": "Private package for integration testing @sa11y packages", | ||
"license": "BSD-3-Clause", | ||
"homepage": "https://github.com/salesforce/sa11y/tree/master/packages/test-integ#readme", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/salesforce/sa11y.git", | ||
"directory": "packages/test-integ" | ||
}, | ||
"devDependencies": { | ||
"@sa11y/jest": "0.1.0" | ||
} | ||
} |
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,4 +1,4 @@ | ||
{ | ||
"compilerOptions": { "strict": true }, | ||
"include": ["./packages/**/*.ts", "*.js"] | ||
"include": ["*.js", "./packages/**/*.ts", "./packages/**/*.js"] | ||
} |