mirror of
https://github.com/zhigang1992/react-native-paper.git
synced 2026-06-13 09:34:40 +08:00
chore: setup jest
This commit is contained in:
@@ -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:
|
||||
@@ -79,6 +89,9 @@ workflows:
|
||||
- lint-and-flow:
|
||||
requires:
|
||||
- install-dependencies
|
||||
- unit-tests:
|
||||
requires:
|
||||
- install-dependencies
|
||||
- build-docs:
|
||||
requires:
|
||||
- install-dependencies
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
node_modules/
|
||||
flow-typed/
|
||||
docs/dist/
|
||||
scripts/
|
||||
|
||||
4
.gitignore
vendored
4
.gitignore
vendored
@@ -39,6 +39,10 @@ node_modules/
|
||||
npm-debug.log
|
||||
yarn-error.log
|
||||
|
||||
# jest
|
||||
#
|
||||
coverage/
|
||||
|
||||
# BUCK
|
||||
#
|
||||
buck-out/
|
||||
|
||||
4
__setup__/enzyme.js
Normal file
4
__setup__/enzyme.js
Normal file
@@ -0,0 +1,4 @@
|
||||
import Enzyme from 'enzyme';
|
||||
import Adapter from 'enzyme-adapter-react-16';
|
||||
|
||||
Enzyme.configure({ adapter: new Adapter() });
|
||||
108
flow-typed/npm/babel-cli_vx.x.x.js
vendored
Normal file
108
flow-typed/npm/babel-cli_vx.x.x.js
vendored
Normal file
@@ -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
flow-typed/npm/babel-preset-react-native_vx.x.x.js
vendored
Normal file
73
flow-typed/npm/babel-preset-react-native_vx.x.x.js
vendored
Normal file
@@ -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
flow-typed/npm/color_vx.x.x.js
vendored
Normal file
33
flow-typed/npm/color_vx.x.x.js
vendored
Normal file
@@ -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
flow-typed/npm/deepmerge_vx.x.x.js
vendored
Normal file
59
flow-typed/npm/deepmerge_vx.x.x.js
vendored
Normal file
@@ -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
flow-typed/npm/enzyme-adapter-react-16_vx.x.x.js
vendored
Normal file
53
flow-typed/npm/enzyme-adapter-react-16_vx.x.x.js
vendored
Normal file
@@ -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'>;
|
||||
}
|
||||
73
flow-typed/npm/enzyme-to-json_vx.x.x.js
vendored
Normal file
73
flow-typed/npm/enzyme-to-json_vx.x.x.js
vendored
Normal file
@@ -0,0 +1,73 @@
|
||||
// flow-typed signature: a7b9fcd9f8c77bc30a45863006eb00dd
|
||||
// flow-typed version: <<STUB>>/enzyme-to-json_v^3.3.1/flow_v0.56.0
|
||||
|
||||
/**
|
||||
* This is an autogenerated libdef stub for:
|
||||
*
|
||||
* 'enzyme-to-json'
|
||||
*
|
||||
* 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-to-json' {
|
||||
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-to-json/createSerializer' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'enzyme-to-json/mount' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'enzyme-to-json/render' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'enzyme-to-json/serializer' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'enzyme-to-json/shallow' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'enzyme-to-json/utils' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
// Filename aliases
|
||||
declare module 'enzyme-to-json/createSerializer.js' {
|
||||
declare module.exports: $Exports<'enzyme-to-json/createSerializer'>;
|
||||
}
|
||||
declare module 'enzyme-to-json/index' {
|
||||
declare module.exports: $Exports<'enzyme-to-json'>;
|
||||
}
|
||||
declare module 'enzyme-to-json/index.js' {
|
||||
declare module.exports: $Exports<'enzyme-to-json'>;
|
||||
}
|
||||
declare module 'enzyme-to-json/mount.js' {
|
||||
declare module.exports: $Exports<'enzyme-to-json/mount'>;
|
||||
}
|
||||
declare module 'enzyme-to-json/render.js' {
|
||||
declare module.exports: $Exports<'enzyme-to-json/render'>;
|
||||
}
|
||||
declare module 'enzyme-to-json/serializer.js' {
|
||||
declare module.exports: $Exports<'enzyme-to-json/serializer'>;
|
||||
}
|
||||
declare module 'enzyme-to-json/shallow.js' {
|
||||
declare module.exports: $Exports<'enzyme-to-json/shallow'>;
|
||||
}
|
||||
declare module 'enzyme-to-json/utils.js' {
|
||||
declare module.exports: $Exports<'enzyme-to-json/utils'>;
|
||||
}
|
||||
128
flow-typed/npm/enzyme_v3.x.x.js
vendored
Normal file
128
flow-typed/npm/enzyme_v3.x.x.js
vendored
Normal file
@@ -0,0 +1,128 @@
|
||||
// flow-typed signature: 7be2af8800fdadaea6ac0404d256bafc
|
||||
// flow-typed version: 6ce6a0467c/enzyme_v3.x.x/flow_>=v0.53.x
|
||||
|
||||
import * as React from "react";
|
||||
|
||||
declare module "enzyme" {
|
||||
declare type PredicateFunction<T: Wrapper> = (
|
||||
wrapper: T,
|
||||
index: number
|
||||
) => boolean;
|
||||
declare type NodeOrNodes = React.Node | Array<React.Node>;
|
||||
declare type EnzymeSelector = string | Class<React.Component<*, *>> | Object;
|
||||
|
||||
// CheerioWrapper is a type alias for an actual cheerio instance
|
||||
// TODO: Reference correct type from cheerio's type declarations
|
||||
declare type CheerioWrapper = any;
|
||||
|
||||
declare class Wrapper {
|
||||
find(selector: EnzymeSelector): this,
|
||||
findWhere(predicate: PredicateFunction<this>): this,
|
||||
filter(selector: EnzymeSelector): this,
|
||||
filterWhere(predicate: PredicateFunction<this>): this,
|
||||
hostNodes(): this,
|
||||
contains(nodeOrNodes: NodeOrNodes): boolean,
|
||||
containsMatchingElement(node: React.Node): boolean,
|
||||
containsAllMatchingElements(nodes: NodeOrNodes): boolean,
|
||||
containsAnyMatchingElements(nodes: NodeOrNodes): boolean,
|
||||
dive(option?: { context?: Object }): this,
|
||||
exists(): boolean,
|
||||
isEmptyRender(): boolean,
|
||||
matchesElement(node: React.Node): boolean,
|
||||
hasClass(className: string): boolean,
|
||||
is(selector: EnzymeSelector): boolean,
|
||||
isEmpty(): boolean,
|
||||
not(selector: EnzymeSelector): this,
|
||||
children(selector?: EnzymeSelector): this,
|
||||
childAt(index: number): this,
|
||||
parents(selector?: EnzymeSelector): this,
|
||||
parent(): this,
|
||||
closest(selector: EnzymeSelector): this,
|
||||
render(): CheerioWrapper,
|
||||
unmount(): this,
|
||||
text(): string,
|
||||
html(): string,
|
||||
get(index: number): React.Node,
|
||||
getDOMNode(): HTMLElement | HTMLInputElement,
|
||||
at(index: number): this,
|
||||
first(): this,
|
||||
last(): this,
|
||||
state(key?: string): any,
|
||||
context(key?: string): any,
|
||||
props(): Object,
|
||||
prop(key: string): any,
|
||||
key(): string,
|
||||
simulate(event: string, ...args: Array<any>): this,
|
||||
setState(state: {}, callback?: Function): this,
|
||||
setProps(props: {}): this,
|
||||
setContext(context: Object): this,
|
||||
instance(): React.Component<*, *>,
|
||||
update(): this,
|
||||
debug(options?: Object): string,
|
||||
type(): string | Function | null,
|
||||
name(): string,
|
||||
forEach(fn: (node: this, index: number) => mixed): this,
|
||||
map<T>(fn: (node: this, index: number) => T): Array<T>,
|
||||
reduce<T>(
|
||||
fn: (value: T, node: this, index: number) => T,
|
||||
initialValue?: T
|
||||
): Array<T>,
|
||||
reduceRight<T>(
|
||||
fn: (value: T, node: this, index: number) => T,
|
||||
initialValue?: T
|
||||
): Array<T>,
|
||||
some(selector: EnzymeSelector): boolean,
|
||||
someWhere(predicate: PredicateFunction<this>): boolean,
|
||||
every(selector: EnzymeSelector): boolean,
|
||||
everyWhere(predicate: PredicateFunction<this>): boolean,
|
||||
length: number
|
||||
}
|
||||
|
||||
declare class ReactWrapper extends Wrapper {
|
||||
constructor(nodes: NodeOrNodes, root: any, options?: ?Object): ReactWrapper,
|
||||
mount(): this,
|
||||
ref(refName: string): this,
|
||||
detach(): void
|
||||
}
|
||||
|
||||
declare class ShallowWrapper extends Wrapper {
|
||||
constructor(
|
||||
nodes: NodeOrNodes,
|
||||
root: any,
|
||||
options?: ?Object
|
||||
): ShallowWrapper,
|
||||
equals(node: React.Node): boolean,
|
||||
shallow(options?: { context?: Object }): ShallowWrapper,
|
||||
getElement(): React.Node,
|
||||
getElements(): Array<React.Node>
|
||||
}
|
||||
|
||||
declare function shallow(
|
||||
node: React.Node,
|
||||
options?: { context?: Object, disableLifecycleMethods?: boolean }
|
||||
): ShallowWrapper;
|
||||
declare function mount(
|
||||
node: React.Node,
|
||||
options?: {
|
||||
context?: Object,
|
||||
attachTo?: HTMLElement,
|
||||
childContextTypes?: Object
|
||||
}
|
||||
): ReactWrapper;
|
||||
declare function render(
|
||||
node: React.Node,
|
||||
options?: { context?: Object }
|
||||
): CheerioWrapper;
|
||||
|
||||
declare module.exports: {
|
||||
configure(options: {
|
||||
Adapter?: any,
|
||||
disableLifecycleMethods?: boolean
|
||||
}): void,
|
||||
render: typeof render,
|
||||
mount: typeof mount,
|
||||
shallow: typeof shallow,
|
||||
ShallowWrapper: typeof ShallowWrapper,
|
||||
ReactWrapper: typeof ReactWrapper
|
||||
};
|
||||
}
|
||||
33
flow-typed/npm/eslint-config-callstack-io_vx.x.x.js
vendored
Normal file
33
flow-typed/npm/eslint-config-callstack-io_vx.x.x.js
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
// flow-typed signature: c6d84edd5564399b8229cb625cffec89
|
||||
// flow-typed version: <<STUB>>/eslint-config-callstack-io_v^1.1.1/flow_v0.56.0
|
||||
|
||||
/**
|
||||
* This is an autogenerated libdef stub for:
|
||||
*
|
||||
* 'eslint-config-callstack-io'
|
||||
*
|
||||
* 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 'eslint-config-callstack-io' {
|
||||
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 'eslint-config-callstack-io/index' {
|
||||
declare module.exports: $Exports<'eslint-config-callstack-io'>;
|
||||
}
|
||||
declare module 'eslint-config-callstack-io/index.js' {
|
||||
declare module.exports: $Exports<'eslint-config-callstack-io'>;
|
||||
}
|
||||
32
flow-typed/npm/eslint-plugin-prettier_vx.x.x.js
vendored
Normal file
32
flow-typed/npm/eslint-plugin-prettier_vx.x.x.js
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
// flow-typed signature: 0eadd7ac9960e38805ddcc4159f87b3b
|
||||
// flow-typed version: <<STUB>>/eslint-plugin-prettier_v^2.1.2/flow_v0.56.0
|
||||
|
||||
/**
|
||||
* This is an autogenerated libdef stub for:
|
||||
*
|
||||
* 'eslint-plugin-prettier'
|
||||
*
|
||||
* 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 'eslint-plugin-prettier' {
|
||||
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 'eslint-plugin-prettier/eslint-plugin-prettier' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
// Filename aliases
|
||||
declare module 'eslint-plugin-prettier/eslint-plugin-prettier.js' {
|
||||
declare module.exports: $Exports<'eslint-plugin-prettier/eslint-plugin-prettier'>;
|
||||
}
|
||||
80
flow-typed/npm/eslint-plugin-react-native_vx.x.x.js
vendored
Normal file
80
flow-typed/npm/eslint-plugin-react-native_vx.x.x.js
vendored
Normal file
@@ -0,0 +1,80 @@
|
||||
// flow-typed signature: 3e17af33d9956a9eda6e17819fcabebd
|
||||
// flow-typed version: <<STUB>>/eslint-plugin-react-native_v^3.2.0/flow_v0.56.0
|
||||
|
||||
/**
|
||||
* This is an autogenerated libdef stub for:
|
||||
*
|
||||
* 'eslint-plugin-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 'eslint-plugin-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 'eslint-plugin-react-native/lib/rules/no-color-literals' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'eslint-plugin-react-native/lib/rules/no-inline-styles' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'eslint-plugin-react-native/lib/rules/no-unused-styles' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'eslint-plugin-react-native/lib/rules/split-platform-components' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'eslint-plugin-react-native/lib/util/Components' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'eslint-plugin-react-native/lib/util/stylesheet' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'eslint-plugin-react-native/lib/util/variable' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
// Filename aliases
|
||||
declare module 'eslint-plugin-react-native/index' {
|
||||
declare module.exports: $Exports<'eslint-plugin-react-native'>;
|
||||
}
|
||||
declare module 'eslint-plugin-react-native/index.js' {
|
||||
declare module.exports: $Exports<'eslint-plugin-react-native'>;
|
||||
}
|
||||
declare module 'eslint-plugin-react-native/lib/rules/no-color-literals.js' {
|
||||
declare module.exports: $Exports<'eslint-plugin-react-native/lib/rules/no-color-literals'>;
|
||||
}
|
||||
declare module 'eslint-plugin-react-native/lib/rules/no-inline-styles.js' {
|
||||
declare module.exports: $Exports<'eslint-plugin-react-native/lib/rules/no-inline-styles'>;
|
||||
}
|
||||
declare module 'eslint-plugin-react-native/lib/rules/no-unused-styles.js' {
|
||||
declare module.exports: $Exports<'eslint-plugin-react-native/lib/rules/no-unused-styles'>;
|
||||
}
|
||||
declare module 'eslint-plugin-react-native/lib/rules/split-platform-components.js' {
|
||||
declare module.exports: $Exports<'eslint-plugin-react-native/lib/rules/split-platform-components'>;
|
||||
}
|
||||
declare module 'eslint-plugin-react-native/lib/util/Components.js' {
|
||||
declare module.exports: $Exports<'eslint-plugin-react-native/lib/util/Components'>;
|
||||
}
|
||||
declare module 'eslint-plugin-react-native/lib/util/stylesheet.js' {
|
||||
declare module.exports: $Exports<'eslint-plugin-react-native/lib/util/stylesheet'>;
|
||||
}
|
||||
declare module 'eslint-plugin-react-native/lib/util/variable.js' {
|
||||
declare module.exports: $Exports<'eslint-plugin-react-native/lib/util/variable'>;
|
||||
}
|
||||
2412
flow-typed/npm/eslint_vx.x.x.js
vendored
Normal file
2412
flow-typed/npm/eslint_vx.x.x.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
6
flow-typed/npm/flow-bin_v0.x.x.js
vendored
Normal file
6
flow-typed/npm/flow-bin_v0.x.x.js
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
// flow-typed signature: 6a5610678d4b01e13bbfbbc62bdaf583
|
||||
// flow-typed version: 3817bc6980/flow-bin_v0.x.x/flow_>=v0.25.x
|
||||
|
||||
declare module "flow-bin" {
|
||||
declare module.exports: string;
|
||||
}
|
||||
15
flow-typed/npm/hoist-non-react-statics_v2.x.x.js
vendored
Normal file
15
flow-typed/npm/hoist-non-react-statics_v2.x.x.js
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
// flow-typed signature: 4a70afc6aaa9f6d8678add172ff49ba7
|
||||
// flow-typed version: 341cb80802/hoist-non-react-statics_v2.x.x/flow_>=v0.54.1
|
||||
|
||||
declare module 'hoist-non-react-statics' {
|
||||
/*
|
||||
S - source component statics
|
||||
TP - target component props
|
||||
SP - additional source component props
|
||||
*/
|
||||
declare module.exports: <TP, SP, S>(
|
||||
target: React$ComponentType<TP>,
|
||||
source: React$ComponentType<TP & SP> & S,
|
||||
blacklist?: { [key: $Keys<S>]: boolean }
|
||||
) => React$ComponentType<TP> & $Shape<S>;
|
||||
}
|
||||
88
flow-typed/npm/husky_vx.x.x.js
vendored
Normal file
88
flow-typed/npm/husky_vx.x.x.js
vendored
Normal file
@@ -0,0 +1,88 @@
|
||||
// flow-typed signature: 8d66b85cc165b391fa17e80fb5fa209a
|
||||
// flow-typed version: <<STUB>>/husky_v^0.14.3/flow_v0.56.0
|
||||
|
||||
/**
|
||||
* This is an autogenerated libdef stub for:
|
||||
*
|
||||
* 'husky'
|
||||
*
|
||||
* 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 'husky' {
|
||||
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 'husky/__tests__/index' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'husky/bin/install' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'husky/bin/uninstall' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'husky/src/install' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'husky/src/uninstall' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'husky/src/utils/find-hooks-dir' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'husky/src/utils/find-parent' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'husky/src/utils/get-hook-script' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'husky/src/utils/is-husky' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
// Filename aliases
|
||||
declare module 'husky/__tests__/index.js' {
|
||||
declare module.exports: $Exports<'husky/__tests__/index'>;
|
||||
}
|
||||
declare module 'husky/bin/install.js' {
|
||||
declare module.exports: $Exports<'husky/bin/install'>;
|
||||
}
|
||||
declare module 'husky/bin/uninstall.js' {
|
||||
declare module.exports: $Exports<'husky/bin/uninstall'>;
|
||||
}
|
||||
declare module 'husky/src/install.js' {
|
||||
declare module.exports: $Exports<'husky/src/install'>;
|
||||
}
|
||||
declare module 'husky/src/uninstall.js' {
|
||||
declare module.exports: $Exports<'husky/src/uninstall'>;
|
||||
}
|
||||
declare module 'husky/src/utils/find-hooks-dir.js' {
|
||||
declare module.exports: $Exports<'husky/src/utils/find-hooks-dir'>;
|
||||
}
|
||||
declare module 'husky/src/utils/find-parent.js' {
|
||||
declare module.exports: $Exports<'husky/src/utils/find-parent'>;
|
||||
}
|
||||
declare module 'husky/src/utils/get-hook-script.js' {
|
||||
declare module.exports: $Exports<'husky/src/utils/get-hook-script'>;
|
||||
}
|
||||
declare module 'husky/src/utils/is-husky.js' {
|
||||
declare module.exports: $Exports<'husky/src/utils/is-husky'>;
|
||||
}
|
||||
594
flow-typed/npm/jest_v22.x.x.js
vendored
Normal file
594
flow-typed/npm/jest_v22.x.x.js
vendored
Normal file
@@ -0,0 +1,594 @@
|
||||
// flow-typed signature: 18018da6c1a1d95b4ab1c64bb5fe86ca
|
||||
// flow-typed version: c1ad61e7d4/jest_v22.x.x/flow_>=v0.39.x
|
||||
|
||||
type JestMockFn<TArguments: $ReadOnlyArray<*>, TReturn> = {
|
||||
(...args: TArguments): TReturn,
|
||||
/**
|
||||
* An object for introspecting mock calls
|
||||
*/
|
||||
mock: {
|
||||
/**
|
||||
* An array that represents all calls that have been made into this mock
|
||||
* function. Each call is represented by an array of arguments that were
|
||||
* passed during the call.
|
||||
*/
|
||||
calls: Array<TArguments>,
|
||||
/**
|
||||
* An array that contains all the object instances that have been
|
||||
* instantiated from this mock function.
|
||||
*/
|
||||
instances: Array<TReturn>
|
||||
},
|
||||
/**
|
||||
* Resets all information stored in the mockFn.mock.calls and
|
||||
* mockFn.mock.instances arrays. Often this is useful when you want to clean
|
||||
* up a mock's usage data between two assertions.
|
||||
*/
|
||||
mockClear(): void,
|
||||
/**
|
||||
* Resets all information stored in the mock. This is useful when you want to
|
||||
* completely restore a mock back to its initial state.
|
||||
*/
|
||||
mockReset(): void,
|
||||
/**
|
||||
* Removes the mock and restores the initial implementation. This is useful
|
||||
* when you want to mock functions in certain test cases and restore the
|
||||
* original implementation in others. Beware that mockFn.mockRestore only
|
||||
* works when mock was created with jest.spyOn. Thus you have to take care of
|
||||
* restoration yourself when manually assigning jest.fn().
|
||||
*/
|
||||
mockRestore(): void,
|
||||
/**
|
||||
* Accepts a function that should be used as the implementation of the mock.
|
||||
* The mock itself will still record all calls that go into and instances
|
||||
* that come from itself -- the only difference is that the implementation
|
||||
* will also be executed when the mock is called.
|
||||
*/
|
||||
mockImplementation(
|
||||
fn: (...args: TArguments) => TReturn
|
||||
): JestMockFn<TArguments, TReturn>,
|
||||
/**
|
||||
* Accepts a function that will be used as an implementation of the mock for
|
||||
* one call to the mocked function. Can be chained so that multiple function
|
||||
* calls produce different results.
|
||||
*/
|
||||
mockImplementationOnce(
|
||||
fn: (...args: TArguments) => TReturn
|
||||
): JestMockFn<TArguments, TReturn>,
|
||||
/**
|
||||
* Just a simple sugar function for returning `this`
|
||||
*/
|
||||
mockReturnThis(): void,
|
||||
/**
|
||||
* Deprecated: use jest.fn(() => value) instead
|
||||
*/
|
||||
mockReturnValue(value: TReturn): JestMockFn<TArguments, TReturn>,
|
||||
/**
|
||||
* Sugar for only returning a value once inside your mock
|
||||
*/
|
||||
mockReturnValueOnce(value: TReturn): JestMockFn<TArguments, TReturn>
|
||||
};
|
||||
|
||||
type JestAsymmetricEqualityType = {
|
||||
/**
|
||||
* A custom Jasmine equality tester
|
||||
*/
|
||||
asymmetricMatch(value: mixed): boolean
|
||||
};
|
||||
|
||||
type JestCallsType = {
|
||||
allArgs(): mixed,
|
||||
all(): mixed,
|
||||
any(): boolean,
|
||||
count(): number,
|
||||
first(): mixed,
|
||||
mostRecent(): mixed,
|
||||
reset(): void
|
||||
};
|
||||
|
||||
type JestClockType = {
|
||||
install(): void,
|
||||
mockDate(date: Date): void,
|
||||
tick(milliseconds?: number): void,
|
||||
uninstall(): void
|
||||
};
|
||||
|
||||
type JestMatcherResult = {
|
||||
message?: string | (() => string),
|
||||
pass: boolean
|
||||
};
|
||||
|
||||
type JestMatcher = (actual: any, expected: any) => JestMatcherResult;
|
||||
|
||||
type JestPromiseType = {
|
||||
/**
|
||||
* Use rejects to unwrap the reason of a rejected promise so any other
|
||||
* matcher can be chained. If the promise is fulfilled the assertion fails.
|
||||
*/
|
||||
rejects: JestExpectType,
|
||||
/**
|
||||
* Use resolves to unwrap the value of a fulfilled promise so any other
|
||||
* matcher can be chained. If the promise is rejected the assertion fails.
|
||||
*/
|
||||
resolves: JestExpectType
|
||||
};
|
||||
|
||||
/**
|
||||
* Jest allows functions and classes to be used as test names in test() and
|
||||
* describe()
|
||||
*/
|
||||
type JestTestName = string | Function;
|
||||
|
||||
/**
|
||||
* Plugin: jest-enzyme
|
||||
*/
|
||||
type EnzymeMatchersType = {
|
||||
toBeChecked(): void,
|
||||
toBeDisabled(): void,
|
||||
toBeEmpty(): void,
|
||||
toBePresent(): void,
|
||||
toContainReact(element: React$Element<any>): void,
|
||||
toHaveClassName(className: string): void,
|
||||
toHaveHTML(html: string): void,
|
||||
toHaveProp(propKey: string, propValue?: any): void,
|
||||
toHaveRef(refName: string): void,
|
||||
toHaveState(stateKey: string, stateValue?: any): void,
|
||||
toHaveStyle(styleKey: string, styleValue?: any): void,
|
||||
toHaveTagName(tagName: string): void,
|
||||
toHaveText(text: string): void,
|
||||
toIncludeText(text: string): void,
|
||||
toHaveValue(value: any): void,
|
||||
toMatchElement(element: React$Element<any>): void,
|
||||
toMatchSelector(selector: string): void
|
||||
};
|
||||
|
||||
type JestExpectType = {
|
||||
not: JestExpectType & EnzymeMatchersType,
|
||||
/**
|
||||
* If you have a mock function, you can use .lastCalledWith to test what
|
||||
* arguments it was last called with.
|
||||
*/
|
||||
lastCalledWith(...args: Array<any>): void,
|
||||
/**
|
||||
* toBe just checks that a value is what you expect. It uses === to check
|
||||
* strict equality.
|
||||
*/
|
||||
toBe(value: any): void,
|
||||
/**
|
||||
* Use .toHaveBeenCalled to ensure that a mock function got called.
|
||||
*/
|
||||
toBeCalled(): void,
|
||||
/**
|
||||
* Use .toBeCalledWith to ensure that a mock function was called with
|
||||
* specific arguments.
|
||||
*/
|
||||
toBeCalledWith(...args: Array<any>): void,
|
||||
/**
|
||||
* Using exact equality with floating point numbers is a bad idea. Rounding
|
||||
* means that intuitive things fail.
|
||||
*/
|
||||
toBeCloseTo(num: number, delta: any): void,
|
||||
/**
|
||||
* Use .toBeDefined to check that a variable is not undefined.
|
||||
*/
|
||||
toBeDefined(): void,
|
||||
/**
|
||||
* Use .toBeFalsy when you don't care what a value is, you just want to
|
||||
* ensure a value is false in a boolean context.
|
||||
*/
|
||||
toBeFalsy(): void,
|
||||
/**
|
||||
* To compare floating point numbers, you can use toBeGreaterThan.
|
||||
*/
|
||||
toBeGreaterThan(number: number): void,
|
||||
/**
|
||||
* To compare floating point numbers, you can use toBeGreaterThanOrEqual.
|
||||
*/
|
||||
toBeGreaterThanOrEqual(number: number): void,
|
||||
/**
|
||||
* To compare floating point numbers, you can use toBeLessThan.
|
||||
*/
|
||||
toBeLessThan(number: number): void,
|
||||
/**
|
||||
* To compare floating point numbers, you can use toBeLessThanOrEqual.
|
||||
*/
|
||||
toBeLessThanOrEqual(number: number): void,
|
||||
/**
|
||||
* Use .toBeInstanceOf(Class) to check that an object is an instance of a
|
||||
* class.
|
||||
*/
|
||||
toBeInstanceOf(cls: Class<*>): void,
|
||||
/**
|
||||
* .toBeNull() is the same as .toBe(null) but the error messages are a bit
|
||||
* nicer.
|
||||
*/
|
||||
toBeNull(): void,
|
||||
/**
|
||||
* Use .toBeTruthy when you don't care what a value is, you just want to
|
||||
* ensure a value is true in a boolean context.
|
||||
*/
|
||||
toBeTruthy(): void,
|
||||
/**
|
||||
* Use .toBeUndefined to check that a variable is undefined.
|
||||
*/
|
||||
toBeUndefined(): void,
|
||||
/**
|
||||
* Use .toContain when you want to check that an item is in a list. For
|
||||
* testing the items in the list, this uses ===, a strict equality check.
|
||||
*/
|
||||
toContain(item: any): void,
|
||||
/**
|
||||
* Use .toContainEqual when you want to check that an item is in a list. For
|
||||
* testing the items in the list, this matcher recursively checks the
|
||||
* equality of all fields, rather than checking for object identity.
|
||||
*/
|
||||
toContainEqual(item: any): void,
|
||||
/**
|
||||
* Use .toEqual when you want to check that two objects have the same value.
|
||||
* This matcher recursively checks the equality of all fields, rather than
|
||||
* checking for object identity.
|
||||
*/
|
||||
toEqual(value: any): void,
|
||||
/**
|
||||
* Use .toHaveBeenCalled to ensure that a mock function got called.
|
||||
*/
|
||||
toHaveBeenCalled(): void,
|
||||
/**
|
||||
* Use .toHaveBeenCalledTimes to ensure that a mock function got called exact
|
||||
* number of times.
|
||||
*/
|
||||
toHaveBeenCalledTimes(number: number): void,
|
||||
/**
|
||||
* Use .toHaveBeenCalledWith to ensure that a mock function was called with
|
||||
* specific arguments.
|
||||
*/
|
||||
toHaveBeenCalledWith(...args: Array<any>): void,
|
||||
/**
|
||||
* Use .toHaveBeenLastCalledWith to ensure that a mock function was last called
|
||||
* with specific arguments.
|
||||
*/
|
||||
toHaveBeenLastCalledWith(...args: Array<any>): void,
|
||||
/**
|
||||
* Check that an object has a .length property and it is set to a certain
|
||||
* numeric value.
|
||||
*/
|
||||
toHaveLength(number: number): void,
|
||||
/**
|
||||
*
|
||||
*/
|
||||
toHaveProperty(propPath: string, value?: any): void,
|
||||
/**
|
||||
* Use .toMatch to check that a string matches a regular expression or string.
|
||||
*/
|
||||
toMatch(regexpOrString: RegExp | string): void,
|
||||
/**
|
||||
* Use .toMatchObject to check that a javascript object matches a subset of the properties of an object.
|
||||
*/
|
||||
toMatchObject(object: Object | Array<Object>): void,
|
||||
/**
|
||||
* This ensures that a React component matches the most recent snapshot.
|
||||
*/
|
||||
toMatchSnapshot(name?: string): void,
|
||||
/**
|
||||
* Use .toThrow to test that a function throws when it is called.
|
||||
* If you want to test that a specific error gets thrown, you can provide an
|
||||
* argument to toThrow. The argument can be a string for the error message,
|
||||
* a class for the error, or a regex that should match the error.
|
||||
*
|
||||
* Alias: .toThrowError
|
||||
*/
|
||||
toThrow(message?: string | Error | Class<Error> | RegExp): void,
|
||||
toThrowError(message?: string | Error | Class<Error> | RegExp): void,
|
||||
/**
|
||||
* Use .toThrowErrorMatchingSnapshot to test that a function throws a error
|
||||
* matching the most recent snapshot when it is called.
|
||||
*/
|
||||
toThrowErrorMatchingSnapshot(): void
|
||||
};
|
||||
|
||||
type JestObjectType = {
|
||||
/**
|
||||
* Disables automatic mocking in the module loader.
|
||||
*
|
||||
* After this method is called, all `require()`s will return the real
|
||||
* versions of each module (rather than a mocked version).
|
||||
*/
|
||||
disableAutomock(): JestObjectType,
|
||||
/**
|
||||
* An un-hoisted version of disableAutomock
|
||||
*/
|
||||
autoMockOff(): JestObjectType,
|
||||
/**
|
||||
* Enables automatic mocking in the module loader.
|
||||
*/
|
||||
enableAutomock(): JestObjectType,
|
||||
/**
|
||||
* An un-hoisted version of enableAutomock
|
||||
*/
|
||||
autoMockOn(): JestObjectType,
|
||||
/**
|
||||
* Clears the mock.calls and mock.instances properties of all mocks.
|
||||
* Equivalent to calling .mockClear() on every mocked function.
|
||||
*/
|
||||
clearAllMocks(): JestObjectType,
|
||||
/**
|
||||
* Resets the state of all mocks. Equivalent to calling .mockReset() on every
|
||||
* mocked function.
|
||||
*/
|
||||
resetAllMocks(): JestObjectType,
|
||||
/**
|
||||
* Restores all mocks back to their original value.
|
||||
*/
|
||||
restoreAllMocks(): JestObjectType,
|
||||
/**
|
||||
* Removes any pending timers from the timer system.
|
||||
*/
|
||||
clearAllTimers(): void,
|
||||
/**
|
||||
* The same as `mock` but not moved to the top of the expectation by
|
||||
* babel-jest.
|
||||
*/
|
||||
doMock(moduleName: string, moduleFactory?: any): JestObjectType,
|
||||
/**
|
||||
* The same as `unmock` but not moved to the top of the expectation by
|
||||
* babel-jest.
|
||||
*/
|
||||
dontMock(moduleName: string): JestObjectType,
|
||||
/**
|
||||
* Returns a new, unused mock function. Optionally takes a mock
|
||||
* implementation.
|
||||
*/
|
||||
fn<TArguments: $ReadOnlyArray<*>, TReturn>(
|
||||
implementation?: (...args: TArguments) => TReturn
|
||||
): JestMockFn<TArguments, TReturn>,
|
||||
/**
|
||||
* Determines if the given function is a mocked function.
|
||||
*/
|
||||
isMockFunction(fn: Function): boolean,
|
||||
/**
|
||||
* Given the name of a module, use the automatic mocking system to generate a
|
||||
* mocked version of the module for you.
|
||||
*/
|
||||
genMockFromModule(moduleName: string): any,
|
||||
/**
|
||||
* Mocks a module with an auto-mocked version when it is being required.
|
||||
*
|
||||
* The second argument can be used to specify an explicit module factory that
|
||||
* is being run instead of using Jest's automocking feature.
|
||||
*
|
||||
* The third argument can be used to create virtual mocks -- mocks of modules
|
||||
* that don't exist anywhere in the system.
|
||||
*/
|
||||
mock(
|
||||
moduleName: string,
|
||||
moduleFactory?: any,
|
||||
options?: Object
|
||||
): JestObjectType,
|
||||
/**
|
||||
* Returns the actual module instead of a mock, bypassing all checks on
|
||||
* whether the module should receive a mock implementation or not.
|
||||
*/
|
||||
requireActual(moduleName: string): any,
|
||||
/**
|
||||
* Returns a mock module instead of the actual module, bypassing all checks
|
||||
* on whether the module should be required normally or not.
|
||||
*/
|
||||
requireMock(moduleName: string): any,
|
||||
/**
|
||||
* Resets the module registry - the cache of all required modules. This is
|
||||
* useful to isolate modules where local state might conflict between tests.
|
||||
*/
|
||||
resetModules(): JestObjectType,
|
||||
/**
|
||||
* Exhausts the micro-task queue (usually interfaced in node via
|
||||
* process.nextTick).
|
||||
*/
|
||||
runAllTicks(): void,
|
||||
/**
|
||||
* Exhausts the macro-task queue (i.e., all tasks queued by setTimeout(),
|
||||
* setInterval(), and setImmediate()).
|
||||
*/
|
||||
runAllTimers(): void,
|
||||
/**
|
||||
* Exhausts all tasks queued by setImmediate().
|
||||
*/
|
||||
runAllImmediates(): void,
|
||||
/**
|
||||
* Executes only the macro task queue (i.e. all tasks queued by setTimeout()
|
||||
* or setInterval() and setImmediate()).
|
||||
*/
|
||||
runTimersToTime(msToRun: number): void,
|
||||
/**
|
||||
* Executes only the macro-tasks that are currently pending (i.e., only the
|
||||
* tasks that have been queued by setTimeout() or setInterval() up to this
|
||||
* point)
|
||||
*/
|
||||
runOnlyPendingTimers(): void,
|
||||
/**
|
||||
* Explicitly supplies the mock object that the module system should return
|
||||
* for the specified module. Note: It is recommended to use jest.mock()
|
||||
* instead.
|
||||
*/
|
||||
setMock(moduleName: string, moduleExports: any): JestObjectType,
|
||||
/**
|
||||
* Indicates that the module system should never return a mocked version of
|
||||
* the specified module from require() (e.g. that it should always return the
|
||||
* real module).
|
||||
*/
|
||||
unmock(moduleName: string): JestObjectType,
|
||||
/**
|
||||
* Instructs Jest to use fake versions of the standard timer functions
|
||||
* (setTimeout, setInterval, clearTimeout, clearInterval, nextTick,
|
||||
* setImmediate and clearImmediate).
|
||||
*/
|
||||
useFakeTimers(): JestObjectType,
|
||||
/**
|
||||
* Instructs Jest to use the real versions of the standard timer functions.
|
||||
*/
|
||||
useRealTimers(): JestObjectType,
|
||||
/**
|
||||
* Creates a mock function similar to jest.fn but also tracks calls to
|
||||
* object[methodName].
|
||||
*/
|
||||
spyOn(object: Object, methodName: string): JestMockFn<any, any>,
|
||||
/**
|
||||
* Set the default timeout interval for tests and before/after hooks in milliseconds.
|
||||
* Note: The default timeout interval is 5 seconds if this method is not called.
|
||||
*/
|
||||
setTimeout(timeout: number): JestObjectType
|
||||
};
|
||||
|
||||
type JestSpyType = {
|
||||
calls: JestCallsType
|
||||
};
|
||||
|
||||
/** Runs this function after every test inside this context */
|
||||
declare function afterEach(
|
||||
fn: (done: () => void) => ?Promise<mixed>,
|
||||
timeout?: number
|
||||
): void;
|
||||
/** Runs this function before every test inside this context */
|
||||
declare function beforeEach(
|
||||
fn: (done: () => void) => ?Promise<mixed>,
|
||||
timeout?: number
|
||||
): void;
|
||||
/** Runs this function after all tests have finished inside this context */
|
||||
declare function afterAll(
|
||||
fn: (done: () => void) => ?Promise<mixed>,
|
||||
timeout?: number
|
||||
): void;
|
||||
/** Runs this function before any tests have started inside this context */
|
||||
declare function beforeAll(
|
||||
fn: (done: () => void) => ?Promise<mixed>,
|
||||
timeout?: number
|
||||
): void;
|
||||
|
||||
/** A context for grouping tests together */
|
||||
declare var describe: {
|
||||
/**
|
||||
* Creates a block that groups together several related tests in one "test suite"
|
||||
*/
|
||||
(name: JestTestName, fn: () => void): void,
|
||||
|
||||
/**
|
||||
* Only run this describe block
|
||||
*/
|
||||
only(name: JestTestName, fn: () => void): void,
|
||||
|
||||
/**
|
||||
* Skip running this describe block
|
||||
*/
|
||||
skip(name: JestTestName, fn: () => void): void
|
||||
};
|
||||
|
||||
/** An individual test unit */
|
||||
declare var it: {
|
||||
/**
|
||||
* An individual test unit
|
||||
*
|
||||
* @param {JestTestName} Name of Test
|
||||
* @param {Function} Test
|
||||
* @param {number} Timeout for the test, in milliseconds.
|
||||
*/
|
||||
(
|
||||
name: JestTestName,
|
||||
fn?: (done: () => void) => ?Promise<mixed>,
|
||||
timeout?: number
|
||||
): void,
|
||||
/**
|
||||
* Only run this test
|
||||
*
|
||||
* @param {JestTestName} Name of Test
|
||||
* @param {Function} Test
|
||||
* @param {number} Timeout for the test, in milliseconds.
|
||||
*/
|
||||
only(
|
||||
name: JestTestName,
|
||||
fn?: (done: () => void) => ?Promise<mixed>,
|
||||
timeout?: number
|
||||
): void,
|
||||
/**
|
||||
* Skip running this test
|
||||
*
|
||||
* @param {JestTestName} Name of Test
|
||||
* @param {Function} Test
|
||||
* @param {number} Timeout for the test, in milliseconds.
|
||||
*/
|
||||
skip(
|
||||
name: JestTestName,
|
||||
fn?: (done: () => void) => ?Promise<mixed>,
|
||||
timeout?: number
|
||||
): void,
|
||||
/**
|
||||
* Run the test concurrently
|
||||
*
|
||||
* @param {JestTestName} Name of Test
|
||||
* @param {Function} Test
|
||||
* @param {number} Timeout for the test, in milliseconds.
|
||||
*/
|
||||
concurrent(
|
||||
name: JestTestName,
|
||||
fn?: (done: () => void) => ?Promise<mixed>,
|
||||
timeout?: number
|
||||
): void
|
||||
};
|
||||
declare function fit(
|
||||
name: JestTestName,
|
||||
fn: (done: () => void) => ?Promise<mixed>,
|
||||
timeout?: number
|
||||
): void;
|
||||
/** An individual test unit */
|
||||
declare var test: typeof it;
|
||||
/** A disabled group of tests */
|
||||
declare var xdescribe: typeof describe;
|
||||
/** A focused group of tests */
|
||||
declare var fdescribe: typeof describe;
|
||||
/** A disabled individual test */
|
||||
declare var xit: typeof it;
|
||||
/** A disabled individual test */
|
||||
declare var xtest: typeof it;
|
||||
|
||||
/** The expect function is used every time you want to test a value */
|
||||
declare var expect: {
|
||||
/** The object that you want to make assertions against */
|
||||
(value: any): JestExpectType & JestPromiseType & EnzymeMatchersType,
|
||||
/** Add additional Jasmine matchers to Jest's roster */
|
||||
extend(matchers: { [name: string]: JestMatcher }): void,
|
||||
/** Add a module that formats application-specific data structures. */
|
||||
addSnapshotSerializer(serializer: (input: Object) => string): void,
|
||||
assertions(expectedAssertions: number): void,
|
||||
hasAssertions(): void,
|
||||
any(value: mixed): JestAsymmetricEqualityType,
|
||||
anything(): void,
|
||||
arrayContaining(value: Array<mixed>): void,
|
||||
objectContaining(value: Object): void,
|
||||
/** Matches any received string that contains the exact expected string. */
|
||||
stringContaining(value: string): void,
|
||||
stringMatching(value: string | RegExp): void
|
||||
};
|
||||
|
||||
// TODO handle return type
|
||||
// http://jasmine.github.io/2.4/introduction.html#section-Spies
|
||||
declare function spyOn(value: mixed, method: string): Object;
|
||||
|
||||
/** Holds all functions related to manipulating test runner */
|
||||
declare var jest: JestObjectType;
|
||||
|
||||
/**
|
||||
* The global Jasmine object, this is generally not exposed as the public API,
|
||||
* using features inside here could break in later versions of Jest.
|
||||
*/
|
||||
declare var jasmine: {
|
||||
DEFAULT_TIMEOUT_INTERVAL: number,
|
||||
any(value: mixed): JestAsymmetricEqualityType,
|
||||
anything(): void,
|
||||
arrayContaining(value: Array<mixed>): void,
|
||||
clock(): JestClockType,
|
||||
createSpy(name: string): JestSpyType,
|
||||
createSpyObj(
|
||||
baseName: string,
|
||||
methodNames: Array<string>
|
||||
): { [methodName: string]: JestSpyType },
|
||||
objectContaining(value: Object): void,
|
||||
stringMatching(value: string): void
|
||||
};
|
||||
178
flow-typed/npm/prettier_v1.x.x.js
vendored
Normal file
178
flow-typed/npm/prettier_v1.x.x.js
vendored
Normal file
@@ -0,0 +1,178 @@
|
||||
// flow-typed signature: 4eed8da2dc730dc33e7710b465eaa44b
|
||||
// flow-typed version: cc7a557b34/prettier_v1.x.x/flow_>=v0.56.x
|
||||
|
||||
declare module "prettier" {
|
||||
declare type AST = Object;
|
||||
declare type Doc = Object;
|
||||
declare type FastPath = Object;
|
||||
|
||||
declare type PrettierParserName =
|
||||
| "babylon"
|
||||
| "flow"
|
||||
| "typescript"
|
||||
| "postcss"
|
||||
| "css"
|
||||
| "less"
|
||||
| "scss"
|
||||
| "json"
|
||||
| "graphql"
|
||||
| "markdown"
|
||||
| "vue";
|
||||
|
||||
declare type PrettierParser = {
|
||||
[name: PrettierParserName]: (text: string, options?: Object) => AST
|
||||
};
|
||||
|
||||
declare type CustomParser = (
|
||||
text: string,
|
||||
parsers: PrettierParser,
|
||||
options: Options
|
||||
) => AST;
|
||||
|
||||
declare type Options = {|
|
||||
printWidth?: number,
|
||||
tabWidth?: number,
|
||||
useTabs?: boolean,
|
||||
semi?: boolean,
|
||||
singleQuote?: boolean,
|
||||
trailingComma?: "none" | "es5" | "all",
|
||||
bracketSpacing?: boolean,
|
||||
jsxBracketSameLine?: boolean,
|
||||
arrowParens?: "avoid" | "always",
|
||||
rangeStart?: number,
|
||||
rangeEnd?: number,
|
||||
parser?: PrettierParserName | CustomParser,
|
||||
filepath?: string,
|
||||
requirePragma?: boolean,
|
||||
insertPragma?: boolean,
|
||||
proseWrap?: "always" | "never" | "preserve",
|
||||
plugins?: Array<string | Plugin>
|
||||
|};
|
||||
|
||||
declare type Plugin = {
|
||||
languages: SupportLanguage,
|
||||
parsers: { [parserName: string]: Parser },
|
||||
printers: { [astFormat: string]: Printer }
|
||||
};
|
||||
|
||||
declare type Parser = {
|
||||
parse: (
|
||||
text: string,
|
||||
parsers: { [parserName: string]: Parser },
|
||||
options: Object
|
||||
) => AST,
|
||||
astFormat: string
|
||||
};
|
||||
|
||||
declare type Printer = {
|
||||
print: (
|
||||
path: FastPath,
|
||||
options: Object,
|
||||
print: (path: FastPath) => Doc
|
||||
) => Doc,
|
||||
embed: (
|
||||
path: FastPath,
|
||||
print: (path: FastPath) => Doc,
|
||||
textToDoc: (text: string, options: Object) => Doc,
|
||||
options: Object
|
||||
) => ?Doc
|
||||
};
|
||||
|
||||
declare type CursorOptions = {|
|
||||
cursorOffset: number,
|
||||
printWidth?: $PropertyType<Options, "printWidth">,
|
||||
tabWidth?: $PropertyType<Options, "tabWidth">,
|
||||
useTabs?: $PropertyType<Options, "useTabs">,
|
||||
semi?: $PropertyType<Options, "semi">,
|
||||
singleQuote?: $PropertyType<Options, "singleQuote">,
|
||||
trailingComma?: $PropertyType<Options, "trailingComma">,
|
||||
bracketSpacing?: $PropertyType<Options, "bracketSpacing">,
|
||||
jsxBracketSameLine?: $PropertyType<Options, "jsxBracketSameLine">,
|
||||
arrowParens?: $PropertyType<Options, "arrowParens">,
|
||||
parser?: $PropertyType<Options, "parser">,
|
||||
filepath?: $PropertyType<Options, "filepath">,
|
||||
requirePragma?: $PropertyType<Options, "requirePragma">,
|
||||
insertPragma?: $PropertyType<Options, "insertPragma">,
|
||||
proseWrap?: $PropertyType<Options, "proseWrap">,
|
||||
plugins?: $PropertyType<Options, "plugins">
|
||||
|};
|
||||
|
||||
declare type CursorResult = {|
|
||||
formatted: string,
|
||||
cursorOffset: number
|
||||
|};
|
||||
|
||||
declare type ResolveConfigOptions = {|
|
||||
useCache?: boolean,
|
||||
config?: string,
|
||||
editorconfig?: boolean
|
||||
|};
|
||||
|
||||
declare type SupportLanguage = {
|
||||
name: string,
|
||||
since: string,
|
||||
parsers: Array<string>,
|
||||
group?: string,
|
||||
tmScope: string,
|
||||
aceMode: string,
|
||||
codemirrorMode: string,
|
||||
codemirrorMimeType: string,
|
||||
aliases?: Array<string>,
|
||||
extensions: Array<string>,
|
||||
filenames?: Array<string>,
|
||||
linguistLanguageId: number,
|
||||
vscodeLanguageIds: Array<string>
|
||||
};
|
||||
|
||||
declare type SupportOption = {|
|
||||
since: string,
|
||||
type: "int" | "boolean" | "choice" | "path",
|
||||
deprecated?: string,
|
||||
redirect?: SupportOptionRedirect,
|
||||
description: string,
|
||||
oppositeDescription?: string,
|
||||
default: SupportOptionValue,
|
||||
range?: SupportOptionRange,
|
||||
choices?: SupportOptionChoice
|
||||
|};
|
||||
|
||||
declare type SupportOptionRedirect = {|
|
||||
options: string,
|
||||
value: SupportOptionValue
|
||||
|};
|
||||
|
||||
declare type SupportOptionRange = {|
|
||||
start: number,
|
||||
end: number,
|
||||
step: number
|
||||
|};
|
||||
|
||||
declare type SupportOptionChoice = {|
|
||||
value: boolean | string,
|
||||
description?: string,
|
||||
since?: string,
|
||||
deprecated?: string,
|
||||
redirect?: SupportOptionValue
|
||||
|};
|
||||
|
||||
declare type SupportOptionValue = number | boolean | string;
|
||||
|
||||
declare type SupportInfo = {|
|
||||
languages: Array<SupportLanguage>,
|
||||
options: Array<SupportOption>
|
||||
|};
|
||||
|
||||
declare type Prettier = {|
|
||||
format: (source: string, options?: Options) => string,
|
||||
check: (source: string, options?: Options) => boolean,
|
||||
formatWithCursor: (source: string, options: CursorOptions) => CursorResult,
|
||||
resolveConfig: {
|
||||
(filePath: string, options?: ResolveConfigOptions): Promise<?Options>,
|
||||
sync(filePath: string, options?: ResolveConfigOptions): Promise<?Options>
|
||||
},
|
||||
clearConfigCache: () => void,
|
||||
getSupportInfo: (version?: string) => SupportInfo
|
||||
|};
|
||||
|
||||
declare export default Prettier;
|
||||
}
|
||||
35
flow-typed/npm/prop-types_v15.x.x.js
vendored
Normal file
35
flow-typed/npm/prop-types_v15.x.x.js
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
// flow-typed signature: d9a983bb1ac458a256c31c139047bdbb
|
||||
// flow-typed version: 927687984d/prop-types_v15.x.x/flow_>=v0.41.x
|
||||
|
||||
type $npm$propTypes$ReactPropsCheckType = (
|
||||
props: any,
|
||||
propName: string,
|
||||
componentName: string,
|
||||
href?: string) => ?Error;
|
||||
|
||||
declare module 'prop-types' {
|
||||
declare var array: React$PropType$Primitive<Array<any>>;
|
||||
declare var bool: React$PropType$Primitive<boolean>;
|
||||
declare var func: React$PropType$Primitive<Function>;
|
||||
declare var number: React$PropType$Primitive<number>;
|
||||
declare var object: React$PropType$Primitive<Object>;
|
||||
declare var string: React$PropType$Primitive<string>;
|
||||
declare var symbol: React$PropType$Primitive<Symbol>;
|
||||
declare var any: React$PropType$Primitive<any>;
|
||||
declare var arrayOf: React$PropType$ArrayOf;
|
||||
declare var element: React$PropType$Primitive<any>; /* TODO */
|
||||
declare var instanceOf: React$PropType$InstanceOf;
|
||||
declare var node: React$PropType$Primitive<any>; /* TODO */
|
||||
declare var objectOf: React$PropType$ObjectOf;
|
||||
declare var oneOf: React$PropType$OneOf;
|
||||
declare var oneOfType: React$PropType$OneOfType;
|
||||
declare var shape: React$PropType$Shape;
|
||||
|
||||
declare function checkPropTypes<V>(
|
||||
propTypes: $Subtype<{[_: $Keys<V>]: $npm$propTypes$ReactPropsCheckType}>,
|
||||
values: V,
|
||||
location: string,
|
||||
componentName: string,
|
||||
getStack: ?(() => ?string)
|
||||
) : void;
|
||||
}
|
||||
346
flow-typed/npm/react-native-vector-icons_vx.x.x.js
vendored
Normal file
346
flow-typed/npm/react-native-vector-icons_vx.x.x.js
vendored
Normal file
@@ -0,0 +1,346 @@
|
||||
// flow-typed signature: 729d1d1de79d0be2d4b81dedb6986e5b
|
||||
// flow-typed version: <<STUB>>/react-native-vector-icons_v~4.4.2/flow_v0.56.0
|
||||
|
||||
/**
|
||||
* This is an autogenerated libdef stub for:
|
||||
*
|
||||
* 'react-native-vector-icons'
|
||||
*
|
||||
* 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 'react-native-vector-icons' {
|
||||
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 'react-native-vector-icons/bin/generate-icon' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-native-vector-icons/bin/generate-material-icons' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-native-vector-icons/dist/Entypo' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-native-vector-icons/dist/EvilIcons' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-native-vector-icons/dist/Feather' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-native-vector-icons/dist/FontAwesome' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-native-vector-icons/dist/Foundation' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-native-vector-icons/dist/index' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-native-vector-icons/dist/Ionicons' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-native-vector-icons/dist/lib/create-icon-set-from-fontello' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-native-vector-icons/dist/lib/create-icon-set-from-icomoon' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-native-vector-icons/dist/lib/create-icon-set' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-native-vector-icons/dist/lib/generate-icon-set-from-css' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-native-vector-icons/dist/lib/icon-button' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-native-vector-icons/dist/lib/react-native' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-native-vector-icons/dist/lib/react-native.osx' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-native-vector-icons/dist/lib/tab-bar-item-ios' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-native-vector-icons/dist/lib/toolbar-android' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-native-vector-icons/dist/MaterialCommunityIcons' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-native-vector-icons/dist/MaterialIcons' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-native-vector-icons/dist/Octicons' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-native-vector-icons/dist/RNIMigration' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-native-vector-icons/dist/SimpleLineIcons' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-native-vector-icons/dist/Zocial' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-native-vector-icons/Entypo' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-native-vector-icons/EvilIcons' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-native-vector-icons/Feather' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-native-vector-icons/FontAwesome' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-native-vector-icons/Foundation' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-native-vector-icons/Ionicons' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-native-vector-icons/lib/create-icon-set-from-fontello' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-native-vector-icons/lib/create-icon-set-from-icomoon' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-native-vector-icons/lib/create-icon-set' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-native-vector-icons/lib/generate-icon-set-from-css' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-native-vector-icons/lib/icon-button' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-native-vector-icons/lib/react-native' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-native-vector-icons/lib/react-native.osx' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-native-vector-icons/lib/tab-bar-item-ios' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-native-vector-icons/lib/toolbar-android' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-native-vector-icons/MaterialCommunityIcons' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-native-vector-icons/MaterialIcons' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-native-vector-icons/Octicons' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-native-vector-icons/RNIMigration' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-native-vector-icons/SimpleLineIcons' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'react-native-vector-icons/Zocial' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
// Filename aliases
|
||||
declare module 'react-native-vector-icons/bin/generate-icon.js' {
|
||||
declare module.exports: $Exports<'react-native-vector-icons/bin/generate-icon'>;
|
||||
}
|
||||
declare module 'react-native-vector-icons/bin/generate-material-icons.js' {
|
||||
declare module.exports: $Exports<'react-native-vector-icons/bin/generate-material-icons'>;
|
||||
}
|
||||
declare module 'react-native-vector-icons/dist/Entypo.js' {
|
||||
declare module.exports: $Exports<'react-native-vector-icons/dist/Entypo'>;
|
||||
}
|
||||
declare module 'react-native-vector-icons/dist/EvilIcons.js' {
|
||||
declare module.exports: $Exports<'react-native-vector-icons/dist/EvilIcons'>;
|
||||
}
|
||||
declare module 'react-native-vector-icons/dist/Feather.js' {
|
||||
declare module.exports: $Exports<'react-native-vector-icons/dist/Feather'>;
|
||||
}
|
||||
declare module 'react-native-vector-icons/dist/FontAwesome.js' {
|
||||
declare module.exports: $Exports<'react-native-vector-icons/dist/FontAwesome'>;
|
||||
}
|
||||
declare module 'react-native-vector-icons/dist/Foundation.js' {
|
||||
declare module.exports: $Exports<'react-native-vector-icons/dist/Foundation'>;
|
||||
}
|
||||
declare module 'react-native-vector-icons/dist/index.js' {
|
||||
declare module.exports: $Exports<'react-native-vector-icons/dist/index'>;
|
||||
}
|
||||
declare module 'react-native-vector-icons/dist/Ionicons.js' {
|
||||
declare module.exports: $Exports<'react-native-vector-icons/dist/Ionicons'>;
|
||||
}
|
||||
declare module 'react-native-vector-icons/dist/lib/create-icon-set-from-fontello.js' {
|
||||
declare module.exports: $Exports<'react-native-vector-icons/dist/lib/create-icon-set-from-fontello'>;
|
||||
}
|
||||
declare module 'react-native-vector-icons/dist/lib/create-icon-set-from-icomoon.js' {
|
||||
declare module.exports: $Exports<'react-native-vector-icons/dist/lib/create-icon-set-from-icomoon'>;
|
||||
}
|
||||
declare module 'react-native-vector-icons/dist/lib/create-icon-set.js' {
|
||||
declare module.exports: $Exports<'react-native-vector-icons/dist/lib/create-icon-set'>;
|
||||
}
|
||||
declare module 'react-native-vector-icons/dist/lib/generate-icon-set-from-css.js' {
|
||||
declare module.exports: $Exports<'react-native-vector-icons/dist/lib/generate-icon-set-from-css'>;
|
||||
}
|
||||
declare module 'react-native-vector-icons/dist/lib/icon-button.js' {
|
||||
declare module.exports: $Exports<'react-native-vector-icons/dist/lib/icon-button'>;
|
||||
}
|
||||
declare module 'react-native-vector-icons/dist/lib/react-native.js' {
|
||||
declare module.exports: $Exports<'react-native-vector-icons/dist/lib/react-native'>;
|
||||
}
|
||||
declare module 'react-native-vector-icons/dist/lib/react-native.osx.js' {
|
||||
declare module.exports: $Exports<'react-native-vector-icons/dist/lib/react-native.osx'>;
|
||||
}
|
||||
declare module 'react-native-vector-icons/dist/lib/tab-bar-item-ios.js' {
|
||||
declare module.exports: $Exports<'react-native-vector-icons/dist/lib/tab-bar-item-ios'>;
|
||||
}
|
||||
declare module 'react-native-vector-icons/dist/lib/toolbar-android.js' {
|
||||
declare module.exports: $Exports<'react-native-vector-icons/dist/lib/toolbar-android'>;
|
||||
}
|
||||
declare module 'react-native-vector-icons/dist/MaterialCommunityIcons.js' {
|
||||
declare module.exports: $Exports<'react-native-vector-icons/dist/MaterialCommunityIcons'>;
|
||||
}
|
||||
declare module 'react-native-vector-icons/dist/MaterialIcons.js' {
|
||||
declare module.exports: $Exports<'react-native-vector-icons/dist/MaterialIcons'>;
|
||||
}
|
||||
declare module 'react-native-vector-icons/dist/Octicons.js' {
|
||||
declare module.exports: $Exports<'react-native-vector-icons/dist/Octicons'>;
|
||||
}
|
||||
declare module 'react-native-vector-icons/dist/RNIMigration.js' {
|
||||
declare module.exports: $Exports<'react-native-vector-icons/dist/RNIMigration'>;
|
||||
}
|
||||
declare module 'react-native-vector-icons/dist/SimpleLineIcons.js' {
|
||||
declare module.exports: $Exports<'react-native-vector-icons/dist/SimpleLineIcons'>;
|
||||
}
|
||||
declare module 'react-native-vector-icons/dist/Zocial.js' {
|
||||
declare module.exports: $Exports<'react-native-vector-icons/dist/Zocial'>;
|
||||
}
|
||||
declare module 'react-native-vector-icons/Entypo.js' {
|
||||
declare module.exports: $Exports<'react-native-vector-icons/Entypo'>;
|
||||
}
|
||||
declare module 'react-native-vector-icons/EvilIcons.js' {
|
||||
declare module.exports: $Exports<'react-native-vector-icons/EvilIcons'>;
|
||||
}
|
||||
declare module 'react-native-vector-icons/Feather.js' {
|
||||
declare module.exports: $Exports<'react-native-vector-icons/Feather'>;
|
||||
}
|
||||
declare module 'react-native-vector-icons/FontAwesome.js' {
|
||||
declare module.exports: $Exports<'react-native-vector-icons/FontAwesome'>;
|
||||
}
|
||||
declare module 'react-native-vector-icons/Foundation.js' {
|
||||
declare module.exports: $Exports<'react-native-vector-icons/Foundation'>;
|
||||
}
|
||||
declare module 'react-native-vector-icons/index' {
|
||||
declare module.exports: $Exports<'react-native-vector-icons'>;
|
||||
}
|
||||
declare module 'react-native-vector-icons/index.js' {
|
||||
declare module.exports: $Exports<'react-native-vector-icons'>;
|
||||
}
|
||||
declare module 'react-native-vector-icons/Ionicons.js' {
|
||||
declare module.exports: $Exports<'react-native-vector-icons/Ionicons'>;
|
||||
}
|
||||
declare module 'react-native-vector-icons/lib/create-icon-set-from-fontello.js' {
|
||||
declare module.exports: $Exports<'react-native-vector-icons/lib/create-icon-set-from-fontello'>;
|
||||
}
|
||||
declare module 'react-native-vector-icons/lib/create-icon-set-from-icomoon.js' {
|
||||
declare module.exports: $Exports<'react-native-vector-icons/lib/create-icon-set-from-icomoon'>;
|
||||
}
|
||||
declare module 'react-native-vector-icons/lib/create-icon-set.js' {
|
||||
declare module.exports: $Exports<'react-native-vector-icons/lib/create-icon-set'>;
|
||||
}
|
||||
declare module 'react-native-vector-icons/lib/generate-icon-set-from-css.js' {
|
||||
declare module.exports: $Exports<'react-native-vector-icons/lib/generate-icon-set-from-css'>;
|
||||
}
|
||||
declare module 'react-native-vector-icons/lib/icon-button.js' {
|
||||
declare module.exports: $Exports<'react-native-vector-icons/lib/icon-button'>;
|
||||
}
|
||||
declare module 'react-native-vector-icons/lib/react-native.js' {
|
||||
declare module.exports: $Exports<'react-native-vector-icons/lib/react-native'>;
|
||||
}
|
||||
declare module 'react-native-vector-icons/lib/react-native.osx.js' {
|
||||
declare module.exports: $Exports<'react-native-vector-icons/lib/react-native.osx'>;
|
||||
}
|
||||
declare module 'react-native-vector-icons/lib/tab-bar-item-ios.js' {
|
||||
declare module.exports: $Exports<'react-native-vector-icons/lib/tab-bar-item-ios'>;
|
||||
}
|
||||
declare module 'react-native-vector-icons/lib/toolbar-android.js' {
|
||||
declare module.exports: $Exports<'react-native-vector-icons/lib/toolbar-android'>;
|
||||
}
|
||||
declare module 'react-native-vector-icons/MaterialCommunityIcons.js' {
|
||||
declare module.exports: $Exports<'react-native-vector-icons/MaterialCommunityIcons'>;
|
||||
}
|
||||
declare module 'react-native-vector-icons/MaterialIcons.js' {
|
||||
declare module.exports: $Exports<'react-native-vector-icons/MaterialIcons'>;
|
||||
}
|
||||
declare module 'react-native-vector-icons/Octicons.js' {
|
||||
declare module.exports: $Exports<'react-native-vector-icons/Octicons'>;
|
||||
}
|
||||
declare module 'react-native-vector-icons/RNIMigration.js' {
|
||||
declare module.exports: $Exports<'react-native-vector-icons/RNIMigration'>;
|
||||
}
|
||||
declare module 'react-native-vector-icons/SimpleLineIcons.js' {
|
||||
declare module.exports: $Exports<'react-native-vector-icons/SimpleLineIcons'>;
|
||||
}
|
||||
declare module 'react-native-vector-icons/Zocial.js' {
|
||||
declare module.exports: $Exports<'react-native-vector-icons/Zocial'>;
|
||||
}
|
||||
62
flow-typed/npm/react-test-renderer_v16.x.x.js
vendored
Normal file
62
flow-typed/npm/react-test-renderer_v16.x.x.js
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
// flow-typed signature: 2d946f2ec4aba5210b19d053c411a59d
|
||||
// flow-typed version: 95b3e05165/react-test-renderer_v16.x.x/flow_>=v0.47.x
|
||||
|
||||
// Type definitions for react-test-renderer 16.x.x
|
||||
// Ported from: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/react-test-renderer
|
||||
|
||||
type ReactTestRendererJSON = {
|
||||
type: string,
|
||||
props: { [propName: string]: any },
|
||||
children: null | ReactTestRendererJSON[]
|
||||
};
|
||||
|
||||
type ReactTestRendererTree = ReactTestRendererJSON & {
|
||||
nodeType: "component" | "host",
|
||||
instance: any,
|
||||
rendered: null | ReactTestRendererTree
|
||||
};
|
||||
|
||||
type ReactTestInstance = {
|
||||
instance: any,
|
||||
type: string,
|
||||
props: { [propName: string]: any },
|
||||
parent: null | ReactTestInstance,
|
||||
children: Array<ReactTestInstance | string>,
|
||||
|
||||
find(predicate: (node: ReactTestInstance) => boolean): ReactTestInstance,
|
||||
findByType(type: React$ElementType): ReactTestInstance,
|
||||
findByProps(props: { [propName: string]: any }): ReactTestInstance,
|
||||
|
||||
findAll(
|
||||
predicate: (node: ReactTestInstance) => boolean,
|
||||
options?: { deep: boolean }
|
||||
): ReactTestInstance[],
|
||||
findAllByType(
|
||||
type: React$ElementType,
|
||||
options?: { deep: boolean }
|
||||
): ReactTestInstance[],
|
||||
findAllByProps(
|
||||
props: { [propName: string]: any },
|
||||
options?: { deep: boolean }
|
||||
): ReactTestInstance[]
|
||||
};
|
||||
|
||||
type ReactTestRenderer = {
|
||||
toJSON(): null | ReactTestRendererJSON,
|
||||
toTree(): null | ReactTestRendererTree,
|
||||
unmount(nextElement?: React$Element<any>): void,
|
||||
update(nextElement: React$Element<any>): void,
|
||||
getInstance(): null | ReactTestInstance,
|
||||
root: ReactTestInstance
|
||||
};
|
||||
|
||||
type TestRendererOptions = {
|
||||
createNodeMock(element: React$Element<any>): any
|
||||
};
|
||||
|
||||
declare module "react-test-renderer" {
|
||||
declare function create(
|
||||
nextElement: React$Element<any>,
|
||||
options?: TestRendererOptions
|
||||
): ReactTestRenderer;
|
||||
}
|
||||
54
package.json
54
package.json
@@ -16,36 +16,56 @@
|
||||
"url": "https://github.com/callstack/react-native-paper/issues"
|
||||
},
|
||||
"homepage": "https://callstack.github.io/react-native-paper",
|
||||
"peerDependencies": {
|
||||
"react": "*",
|
||||
"react-native": "*",
|
||||
"react-native-vector-icons": "*"
|
||||
"scripts": {
|
||||
"commitmsg": "node ./scripts/validate-commit-message.js $GIT_PARAMS",
|
||||
"precommit": "yarn run lint && yarn run flow",
|
||||
"flow": "flow",
|
||||
"lint": "eslint .",
|
||||
"test": "jest",
|
||||
"bootstrap": "yarn --cwd example && yarn --cwd docs"
|
||||
},
|
||||
"dependencies": {
|
||||
"color": "^2.0.1",
|
||||
"create-react-context": "^0.2.1",
|
||||
"deepmerge": "^2.0.1",
|
||||
"hoist-non-react-statics": "^2.5.0",
|
||||
"prop-types": "^15.6.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"babel-cli": "^6.26.0",
|
||||
"babel-preset-react-native": "^4.0.0",
|
||||
"enzyme": "^3.3.0",
|
||||
"enzyme-adapter-react-16": "^1.1.1",
|
||||
"enzyme-to-json": "^3.3.1",
|
||||
"eslint": "^4.18.1",
|
||||
"eslint-config-callstack-io": "^1.1.1",
|
||||
"eslint-plugin-prettier": "^2.1.2",
|
||||
"eslint-plugin-react-native": "^3.2.0",
|
||||
"flow-bin": "~0.56.0",
|
||||
"husky": "^0.14.3",
|
||||
"jest": "^22.4.2",
|
||||
"prettier": "^1.8.2",
|
||||
"react": "16.0.0",
|
||||
"react-dom": "^16.2.0",
|
||||
"react-native": "~0.50.3",
|
||||
"react-native-vector-icons": "~4.4.2"
|
||||
"react-native-vector-icons": "~4.4.2",
|
||||
"react-test-renderer": "^16.2.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"color": "^2.0.1",
|
||||
"deepmerge": "^2.0.1",
|
||||
"hoist-non-react-statics": "^2.5.0",
|
||||
"prop-types": "^15.6.0"
|
||||
"peerDependencies": {
|
||||
"react": "*",
|
||||
"react-native": "*",
|
||||
"react-native-vector-icons": "*"
|
||||
},
|
||||
"scripts": {
|
||||
"commitmsg": "node ./scripts/validate-commit-message.js $GIT_PARAMS",
|
||||
"precommit": "yarn run lint && yarn run flow",
|
||||
"flow": "flow",
|
||||
"lint": "eslint .",
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"bootstrap": "yarn --cwd example && yarn --cwd docs"
|
||||
"jest": {
|
||||
"preset": "react-native",
|
||||
"setupFiles": [
|
||||
"<rootDir>/__setup__/enzyme.js"
|
||||
],
|
||||
"modulePathIgnorePatterns": [
|
||||
"<rootDir>/example/node_modules"
|
||||
],
|
||||
"snapshotSerializers": [
|
||||
"enzyme-to-json/serializer"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user