forked from carbon-design-system/carbon
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(project): add jest-config-carbon (carbon-design-system#7315)
* feat(project): add jest-config-carbon * chore(project): update yarn.lock * chore(format): run prettier Co-authored-by: Josh Black <[email protected]> Co-authored-by: TJ Egan <[email protected]> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
- Loading branch information
1 parent
80d1abd
commit 122338a
Showing
16 changed files
with
144 additions
and
64 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
**/__mocks__/** | ||
**/__tests__/** | ||
**/examples/** | ||
**/tasks/** |
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,29 @@ | ||
# jest-config-carbon | ||
|
||
> Jest configuration and preset for Carbon | ||
## Getting started | ||
|
||
To install `jest-config-carbon` in your project, you will need to run the | ||
following command using [npm](https://www.npmjs.com/): | ||
|
||
```bash | ||
npm install -S jest-config-carbon | ||
``` | ||
|
||
If you prefer [Yarn](https://yarnpkg.com/en/), use the following command | ||
instead: | ||
|
||
```bash | ||
yarn add jest-config-carbon | ||
``` | ||
|
||
## 🙌 Contributing | ||
|
||
We're always looking for contributors to help us fix bugs, build new features, | ||
or help us improve the project documentation. If you're interested, definitely | ||
check out our [Contributing Guide](/.github/CONTRIBUTING.md)! 👀 | ||
|
||
## 📝 License | ||
|
||
Licensed under the [Apache 2.0 License](/LICENSE). |
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,49 @@ | ||
/** | ||
* Copyright IBM Corp. 2018, 2018 | ||
* | ||
* This source code is licensed under the Apache-2.0 license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
'use strict'; | ||
|
||
module.exports = { | ||
moduleFileExtensions: ['js', 'json', 'node'], | ||
reporters: ['default'], | ||
setupFiles: [require.resolve('./setup/setup.js')], | ||
setupFilesAfterEnv: [require.resolve('./setup/setupAfterEnv.js')], | ||
snapshotSerializers: ['enzyme-to-json/serializer'], | ||
testMatch: [ | ||
'<rootDir>/**/__tests__/**/*.js?(x)', | ||
'<rootDir>/**/*.(spec|test).js?(x)', | ||
'<rootDir>/**/*-(spec|test).js?(x)', | ||
], | ||
transform: { | ||
'^.+\\.(js|jsx)$': require.resolve('./transform/jsTransform.js'), | ||
'^.+\\.css$': require.resolve('./transform/cssTransform.js'), | ||
'^(?!.*\\.(js|jsx|css|json)$)': require.resolve( | ||
'./transform/fileTransform.js' | ||
), | ||
}, | ||
testRunner: 'jest-circus/runner', | ||
testPathIgnorePatterns: [ | ||
'/cjs/', | ||
'/dist/', | ||
'/es/', | ||
'/lib/', | ||
'/build/', | ||
'e2e', | ||
'examples', | ||
'/umd/', | ||
], | ||
transformIgnorePatterns: ['[/\\\\]node_modules[/\\\\].+\\.(js|jsx)$'], | ||
watchPathIgnorePatterns: [ | ||
'/cjs/', | ||
'/dist/', | ||
'/es/', | ||
'/examples/', | ||
'/lib/', | ||
'/storybook/', | ||
'/results/', | ||
], | ||
}; |
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,12 @@ | ||
/** | ||
* Copyright IBM Corp. 2018, 2018 | ||
* | ||
* This source code is licensed under the Apache-2.0 license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
'use strict'; | ||
|
||
const config = require('./'); | ||
|
||
module.exports = config; |
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,40 @@ | ||
{ | ||
"name": "jest-config-carbon", | ||
"private": true, | ||
"description": "Jest configuration and preset for Carbon", | ||
"dependencies": { | ||
"@babel/core": "^7.10.0", | ||
"@babel/plugin-proposal-class-properties": "^7.7.4", | ||
"@babel/plugin-proposal-export-default-from": "^7.7.4", | ||
"@babel/plugin-proposal-export-namespace-from": "^7.7.4", | ||
"@babel/plugin-transform-runtime": "^7.10.0", | ||
"@babel/preset-env": "^7.10.0", | ||
"@babel/preset-react": "^7.10.0", | ||
"@babel/runtime": "^7.10.0", | ||
"@ibma/aat": "https://able.ibm.com/tools/dist/ibma-aat-2.0.6.tgz", | ||
"accessibility-checker": "^3.1.1", | ||
"axe-core": "^3.3.2", | ||
"babel-jest": "^26.0.1", | ||
"chalk": "^4.1.0", | ||
"enzyme": "^3.10.0", | ||
"enzyme-adapter-react-16": "^1.14.0", | ||
"enzyme-to-json": "^3.3.5", | ||
"jest-circus": "^26.0.1" | ||
}, | ||
"version": "0.0.0", | ||
"license": "Apache-2.0", | ||
"main": "index.js", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/carbon-design-system/carbon.git", | ||
"directory": "config/jest-config-carbon" | ||
}, | ||
"bugs": "https://github.com/carbon-design-system/carbon/issues", | ||
"keywords": [ | ||
"ibm", | ||
"carbon", | ||
"carbon-design-system", | ||
"components", | ||
"react" | ||
] | ||
} |
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
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