Skip to content

Commit

Permalink
chore: setup jest
Browse files Browse the repository at this point in the history
  • Loading branch information
satya164 committed Mar 2, 2018
1 parent c3fedbd commit 5a67be9
Show file tree
Hide file tree
Showing 26 changed files with 5,797 additions and 74 deletions.
3 changes: 3 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"presets": ["react-native"]
}
13 changes: 13 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,16 @@ jobs:
- run: |
yarn run lint
yarn run flow
unit-tests:
<<: *defaults
steps:
- attach_workspace:
at: ~/react-native-paper
- run: yarn test -- --coverage
- store_artifacts:
path: coverage
destination: coverage
build-docs:
<<: *defaults
steps:
Expand Down Expand Up @@ -79,6 +89,9 @@ workflows:
- lint-and-flow:
requires:
- install-dependencies
- unit-tests:
requires:
- install-dependencies
- build-docs:
requires:
- install-dependencies
Expand Down
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules/
flow-typed/
docs/dist/
scripts/
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ node_modules/
npm-debug.log
yarn-error.log

# jest
#
coverage/

# BUCK
#
buck-out/
Expand Down
4 changes: 4 additions & 0 deletions __setup__/enzyme.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import Enzyme from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';

Enzyme.configure({ adapter: new Adapter() });
108 changes: 108 additions & 0 deletions flow-typed/npm/babel-cli_vx.x.x.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
// flow-typed signature: 45660148c1072407a12908e4a58550b5
// flow-typed version: <<STUB>>/babel-cli_v^6.26.0/flow_v0.56.0

/**
* This is an autogenerated libdef stub for:
*
* 'babel-cli'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* https://github.com/flowtype/flow-typed
*/

declare module 'babel-cli' {
declare module.exports: any;
}

/**
* We include stubs for each file inside this npm package in case you need to
* require those files directly. Feel free to delete any files that aren't
* needed.
*/
declare module 'babel-cli/bin/babel-doctor' {
declare module.exports: any;
}

declare module 'babel-cli/bin/babel-external-helpers' {
declare module.exports: any;
}

declare module 'babel-cli/bin/babel-node' {
declare module.exports: any;
}

declare module 'babel-cli/bin/babel' {
declare module.exports: any;
}

declare module 'babel-cli/lib/_babel-node' {
declare module.exports: any;
}

declare module 'babel-cli/lib/babel-external-helpers' {
declare module.exports: any;
}

declare module 'babel-cli/lib/babel-node' {
declare module.exports: any;
}

declare module 'babel-cli/lib/babel/dir' {
declare module.exports: any;
}

declare module 'babel-cli/lib/babel/file' {
declare module.exports: any;
}

declare module 'babel-cli/lib/babel/index' {
declare module.exports: any;
}

declare module 'babel-cli/lib/babel/util' {
declare module.exports: any;
}

// Filename aliases
declare module 'babel-cli/bin/babel-doctor.js' {
declare module.exports: $Exports<'babel-cli/bin/babel-doctor'>;
}
declare module 'babel-cli/bin/babel-external-helpers.js' {
declare module.exports: $Exports<'babel-cli/bin/babel-external-helpers'>;
}
declare module 'babel-cli/bin/babel-node.js' {
declare module.exports: $Exports<'babel-cli/bin/babel-node'>;
}
declare module 'babel-cli/bin/babel.js' {
declare module.exports: $Exports<'babel-cli/bin/babel'>;
}
declare module 'babel-cli/index' {
declare module.exports: $Exports<'babel-cli'>;
}
declare module 'babel-cli/index.js' {
declare module.exports: $Exports<'babel-cli'>;
}
declare module 'babel-cli/lib/_babel-node.js' {
declare module.exports: $Exports<'babel-cli/lib/_babel-node'>;
}
declare module 'babel-cli/lib/babel-external-helpers.js' {
declare module.exports: $Exports<'babel-cli/lib/babel-external-helpers'>;
}
declare module 'babel-cli/lib/babel-node.js' {
declare module.exports: $Exports<'babel-cli/lib/babel-node'>;
}
declare module 'babel-cli/lib/babel/dir.js' {
declare module.exports: $Exports<'babel-cli/lib/babel/dir'>;
}
declare module 'babel-cli/lib/babel/file.js' {
declare module.exports: $Exports<'babel-cli/lib/babel/file'>;
}
declare module 'babel-cli/lib/babel/index.js' {
declare module.exports: $Exports<'babel-cli/lib/babel/index'>;
}
declare module 'babel-cli/lib/babel/util.js' {
declare module.exports: $Exports<'babel-cli/lib/babel/util'>;
}
73 changes: 73 additions & 0 deletions flow-typed/npm/babel-preset-react-native_vx.x.x.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
// flow-typed signature: da7f4ffcfb420e0ad7492e04856705c2
// flow-typed version: <<STUB>>/babel-preset-react-native_v^4.0.0/flow_v0.56.0

/**
* This is an autogenerated libdef stub for:
*
* 'babel-preset-react-native'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* https://github.com/flowtype/flow-typed
*/

declare module 'babel-preset-react-native' {
declare module.exports: any;
}

/**
* We include stubs for each file inside this npm package in case you need to
* require those files directly. Feel free to delete any files that aren't
* needed.
*/
declare module 'babel-preset-react-native/configs/hmr' {
declare module.exports: any;
}

declare module 'babel-preset-react-native/configs/main' {
declare module.exports: any;
}

declare module 'babel-preset-react-native/lib/resolvePlugins' {
declare module.exports: any;
}

declare module 'babel-preset-react-native/plugins' {
declare module.exports: any;
}

declare module 'babel-preset-react-native/transforms/transform-dynamic-import' {
declare module.exports: any;
}

declare module 'babel-preset-react-native/transforms/transform-symbol-member' {
declare module.exports: any;
}

// Filename aliases
declare module 'babel-preset-react-native/configs/hmr.js' {
declare module.exports: $Exports<'babel-preset-react-native/configs/hmr'>;
}
declare module 'babel-preset-react-native/configs/main.js' {
declare module.exports: $Exports<'babel-preset-react-native/configs/main'>;
}
declare module 'babel-preset-react-native/index' {
declare module.exports: $Exports<'babel-preset-react-native'>;
}
declare module 'babel-preset-react-native/index.js' {
declare module.exports: $Exports<'babel-preset-react-native'>;
}
declare module 'babel-preset-react-native/lib/resolvePlugins.js' {
declare module.exports: $Exports<'babel-preset-react-native/lib/resolvePlugins'>;
}
declare module 'babel-preset-react-native/plugins.js' {
declare module.exports: $Exports<'babel-preset-react-native/plugins'>;
}
declare module 'babel-preset-react-native/transforms/transform-dynamic-import.js' {
declare module.exports: $Exports<'babel-preset-react-native/transforms/transform-dynamic-import'>;
}
declare module 'babel-preset-react-native/transforms/transform-symbol-member.js' {
declare module.exports: $Exports<'babel-preset-react-native/transforms/transform-symbol-member'>;
}
33 changes: 33 additions & 0 deletions flow-typed/npm/color_vx.x.x.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// flow-typed signature: de753e927928b3fbda7bb17f34280229
// flow-typed version: <<STUB>>/color_v^2.0.1/flow_v0.56.0

/**
* This is an autogenerated libdef stub for:
*
* 'color'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* https://github.com/flowtype/flow-typed
*/

declare module 'color' {
declare module.exports: any;
}

/**
* We include stubs for each file inside this npm package in case you need to
* require those files directly. Feel free to delete any files that aren't
* needed.
*/


// Filename aliases
declare module 'color/index' {
declare module.exports: $Exports<'color'>;
}
declare module 'color/index.js' {
declare module.exports: $Exports<'color'>;
}
59 changes: 59 additions & 0 deletions flow-typed/npm/deepmerge_vx.x.x.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
// flow-typed signature: c88faf2f25ae2239e28ad711053f36d1
// flow-typed version: <<STUB>>/deepmerge_v^2.0.1/flow_v0.56.0

/**
* This is an autogenerated libdef stub for:
*
* 'deepmerge'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* https://github.com/flowtype/flow-typed
*/

declare module 'deepmerge' {
declare module.exports: any;
}

/**
* We include stubs for each file inside this npm package in case you need to
* require those files directly. Feel free to delete any files that aren't
* needed.
*/
declare module 'deepmerge/dist/cjs' {
declare module.exports: any;
}

declare module 'deepmerge/dist/es' {
declare module.exports: any;
}

declare module 'deepmerge/dist/umd' {
declare module.exports: any;
}

declare module 'deepmerge/rollup.config' {
declare module.exports: any;
}

// Filename aliases
declare module 'deepmerge/dist/cjs.js' {
declare module.exports: $Exports<'deepmerge/dist/cjs'>;
}
declare module 'deepmerge/dist/es.js' {
declare module.exports: $Exports<'deepmerge/dist/es'>;
}
declare module 'deepmerge/dist/umd.js' {
declare module.exports: $Exports<'deepmerge/dist/umd'>;
}
declare module 'deepmerge/index' {
declare module.exports: $Exports<'deepmerge'>;
}
declare module 'deepmerge/index.js' {
declare module.exports: $Exports<'deepmerge'>;
}
declare module 'deepmerge/rollup.config.js' {
declare module.exports: $Exports<'deepmerge/rollup.config'>;
}
53 changes: 53 additions & 0 deletions flow-typed/npm/enzyme-adapter-react-16_vx.x.x.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
// flow-typed signature: 4c4da3082c1de07c7c7552ae8cf9b097
// flow-typed version: <<STUB>>/enzyme-adapter-react-16_v^1.1.1/flow_v0.56.0

/**
* This is an autogenerated libdef stub for:
*
* 'enzyme-adapter-react-16'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* https://github.com/flowtype/flow-typed
*/

declare module 'enzyme-adapter-react-16' {
declare module.exports: any;
}

/**
* We include stubs for each file inside this npm package in case you need to
* require those files directly. Feel free to delete any files that aren't
* needed.
*/
declare module 'enzyme-adapter-react-16/build/index' {
declare module.exports: any;
}

declare module 'enzyme-adapter-react-16/build/ReactSixteenAdapter' {
declare module.exports: any;
}

declare module 'enzyme-adapter-react-16/src/index' {
declare module.exports: any;
}

declare module 'enzyme-adapter-react-16/src/ReactSixteenAdapter' {
declare module.exports: any;
}

// Filename aliases
declare module 'enzyme-adapter-react-16/build/index.js' {
declare module.exports: $Exports<'enzyme-adapter-react-16/build/index'>;
}
declare module 'enzyme-adapter-react-16/build/ReactSixteenAdapter.js' {
declare module.exports: $Exports<'enzyme-adapter-react-16/build/ReactSixteenAdapter'>;
}
declare module 'enzyme-adapter-react-16/src/index.js' {
declare module.exports: $Exports<'enzyme-adapter-react-16/src/index'>;
}
declare module 'enzyme-adapter-react-16/src/ReactSixteenAdapter.js' {
declare module.exports: $Exports<'enzyme-adapter-react-16/src/ReactSixteenAdapter'>;
}
Loading

0 comments on commit 5a67be9

Please sign in to comment.