Skip to content

Commit f6262c7

Browse files
committed
Merge branch 'master' of https://github.com/nate0001/kit into nate0001-master
2 parents c31d992 + f1ea326 commit f6262c7

File tree

6 files changed

+108
-12
lines changed

6 files changed

+108
-12
lines changed

.babelrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"presets": [
3+
"react",
34
["env", {
45
"targets": {
56
"node": true

.eslintrc.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,14 @@ module.exports = {
1515
env: {
1616
node: true,
1717
browser: true,
18+
'jest/globals': true,
1819
},
1920
plugins: [
2021
'babel',
2122
'import',
2223
'jsx-a11y',
2324
'compat',
25+
'jest',
2426
],
2527
rules: {
2628
'arrow-parens': ['error', 'as-needed'],

jest.config.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
module.exports = {
2+
coverageReporters: ['text'],
3+
collectCoverageFrom: [
4+
'src/**/*.js(x)',
5+
],
6+
transform: {
7+
'^.+\\.js(x)$': '<rootDir>/jest.transform.js',
8+
},
9+
};

jest.transform.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/* eslint-disable import/no-extraneous-dependencies */
2+
const babel = require('babel-jest');
3+
4+
module.exports = babel.createTransformer({
5+
presets: [
6+
'react',
7+
['env', {
8+
targets: {
9+
node: true,
10+
},
11+
}],
12+
],
13+
plugins: [
14+
['module-resolver', {
15+
root: ['.'],
16+
alias: {
17+
src: './src',
18+
},
19+
}],
20+
'transform-object-rest-spread',
21+
'syntax-dynamic-import',
22+
'transform-regenerator',
23+
'transform-class-properties',
24+
'transform-decorators-legacy',
25+
],
26+
});

package-lock.json

Lines changed: 66 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@
2323
"devDependencies": {
2424
"babel-core": "^6.26.0",
2525
"babel-eslint": "^7.2.3",
26+
"babel-jest": "^21.2.0",
2627
"babel-loader": "^7.1.2",
28+
"babel-plugin-module-resolver": "^2.7.1",
2729
"babel-plugin-syntax-dynamic-import": "^6.18.0",
2830
"babel-plugin-transform-class-properties": "^6.24.1",
2931
"babel-plugin-transform-decorators-legacy": "^1.3.4",
@@ -45,6 +47,7 @@
4547
"eslint-plugin-babel": "^4.1.2",
4648
"eslint-plugin-compat": "^1.0.4",
4749
"eslint-plugin-import": "^2.7.0",
50+
"eslint-plugin-jest": "^21.1.0",
4851
"eslint-plugin-jsx-a11y": "^5.1.1",
4952
"eslint-plugin-react": "^7.3.0",
5053
"extract-text-webpack-plugin": "^3.0.0",
@@ -63,6 +66,7 @@
6366
"postcss-loader": "^2.0.6",
6467
"postcss-nested": "^2.1.2",
6568
"progress-bar-webpack-plugin": "^1.10.0",
69+
"react-test-renderer": "^16.0.0-rc.3",
6670
"resolve-url-loader": "^2.1.0",
6771
"rimraf": "^2.6.1",
6872
"sass-loader": "^6.0.6",

0 commit comments

Comments
 (0)