Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: adriantoine/enzyme-to-json
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v3.6.0
Choose a base ref
...
head repository: adriantoine/enzyme-to-json
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v3.6.1
Choose a head ref
  • 3 commits
  • 3 files changed
  • 3 contributors

Commits on Sep 28, 2020

  1. Copy the full SHA
    63f4026 View commit details
  2. Merge pull request #172 from chyzwar/fix-cherio-type

    fix(): fix cherio types following DT changes
    VincentLanglet authored Sep 28, 2020
    Copy the full SHA
    b80ae29 View commit details
  3. v3.6.1

    VincentLanglet committed Sep 28, 2020
    Copy the full SHA
    d683503 View commit details
Showing with 12 additions and 4 deletions.
  1. +3 −3 index.d.ts
  2. +2 −1 package.json
  3. +7 −0 yarn.lock
6 changes: 3 additions & 3 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -29,8 +29,8 @@ export interface JestSerializer {
* @param wrapper any Enzyme wrapper
* @param [options] an option object which accepts `map`, `noKey` and `mode` as keys
*/
export declare function toJson(wrapper: CommonWrapper | Cheerio, options?: Options): Json;
export declare function toJson<P, S>(wrapper: CommonWrapper<P, S> | Cheerio, options?: Options): Json;
export declare function toJson(wrapper: CommonWrapper | cheerio.Cheerio, options?: Options): Json;
export declare function toJson<P, S>(wrapper: CommonWrapper<P, S> | cheerio.Cheerio, options?: Options): Json;

/**
* shallowToJson helper is used to convert Enzyme shallow wrappers to a format compatible with Jest snapshot
@@ -53,7 +53,7 @@ export declare function mountToJson<P, S>(wrapper: ReactWrapper<P, S>, options?:
* @param wrapper an Enzyme render wrapper
* @param [options] an option object which accepts `map`, `noKey` and `mode` as keys
*/
export declare function renderToJson(wrapper: Cheerio, options?: Options): Json;
export declare function renderToJson(wrapper: cheerio.Cheerio, options?: Options): Json;

/**
* createSerializer helper is used to create snapshot serializers for Jest
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "3.6.0",
"version": "3.6.1",
"name": "enzyme-to-json",
"description": "convert enzyme wrapper to a format compatible with Jest snapshot",
"main": "index.js",
@@ -40,6 +40,7 @@
},
"license": "MIT",
"dependencies": {
"@types/cheerio": "^0.22.22",
"lodash": "^4.17.15",
"react-is": "^16.12.0"
},
7 changes: 7 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
@@ -1087,6 +1087,13 @@
dependencies:
"@babel/types" "^7.3.0"

"@types/cheerio@^0.22.22":
version "0.22.22"
resolved "https://registry.yarnpkg.com/@types/cheerio/-/cheerio-0.22.22.tgz#ae71cf4ca59b8bbaf34c99af7a5d6c8894988f5f"
integrity sha512-05DYX4zU96IBfZFY+t3Mh88nlwSMtmmzSYaQkKN48T495VV1dkHSah6qYyDTN5ngaS0i0VonH37m+RuzSM0YiA==
dependencies:
"@types/node" "*"

"@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0":
version "2.0.1"
resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.1.tgz#42995b446db9a48a11a07ec083499a860e9138ff"