This repository has been archived by the owner on Mar 4, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 55
test: component description conformance test #400
Merged
Merged
Changes from 5 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
86a645f
test: add component description conformance test
levithomason 1d5b3e8
docs: add and fix component descriptions
levithomason 619eb40
- run jest tests in band to avoid OOM errors
miroslavstastny 2972c50
- pass runInBand and maxWorkers parameters from gulp to jest
miroslavstastny 40c0195
Merge branch 'master' into test/component-descriptions
hughreeling 2b0b198
fix typo
levithomason 1686b03
simplify test-unit command build up
levithomason File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import { parallel, series, task } from 'gulp' | ||
import { argv } from 'yargs' | ||
|
||
import sh from '../sh' | ||
|
||
// ---------------------------------------- | ||
// Jest | ||
// ---------------------------------------- | ||
const jest = ({ watch = false } = {}) => cb => { | ||
process.env.NODE_ENV = 'test' | ||
|
||
// in watch mode jest never exits | ||
// let the gulp task complete to prevent blocking subsequent tasks | ||
const command = [ | ||
'jest --coverage', | ||
...(watch ? ['--watchAll'] : []), | ||
...(argv.runInBand ? ['--runInBand'] : []), | ||
...(argv.maxWorkers ? [`--maxWorkers=${argv.maxWorkers}`] : []), | ||
].join(' ') | ||
return sh(command) | ||
} | ||
|
||
task('test:jest:pre', () => sh('yarn satisfied')) | ||
|
||
task( | ||
'test:jest:setup', | ||
series('test:jest:pre', parallel('build:docs:docgen', 'build:docs:component-menu-behaviors')), | ||
) | ||
|
||
task('test:jest', jest()) | ||
task('test:jest:watch', jest({ watch: true })) | ||
|
||
// ---------------------------------------- | ||
// Tests | ||
// ---------------------------------------- | ||
|
||
task('test', series('test:jest:setup', 'test:jest')) | ||
task('test:watch', series('test:jest:setup', parallel('test:jest:watch', 'watch:docs'))) |
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
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
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 |
---|---|---|
|
@@ -45,6 +45,7 @@ export interface RadioGroupItemState { | |
} | ||
|
||
/** | ||
* A single radio with a radio group. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 'A single radio within a radio group.' might be better description |
||
* @accessibility | ||
* Radio items need to be grouped in RadioGroup component to correctly handle accessibility. | ||
*/ | ||
|
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change was required to run jest's watch and gulp's doc watch commands in parallel. The watchers never exit so they cannot be started in series.