Skip to content

Releases: adriantoine/enzyme-to-json

v1.4.3

07 Dec 11:31
Compare
Choose a tag to compare

<a name"1.4.3">

1.4.3 (2016-12-07)

Bug Fixes

  • Renamed test folder in npmingore (59c57226)

v1.4.2

07 Dec 11:29
Compare
Choose a tag to compare

<a name"1.4.2">

1.4.2 (2016-12-07)

Bug Fixes

  • Fixed serializer and added proper tests (#33) (309d6ea3)

v1.4.1

06 Dec 18:13
Compare
Choose a tag to compare

<a name"1.4.1">

1.4.1 (2016-12-06)

Bug Fixes

v1.4.0

06 Dec 17:53
Compare
Choose a tag to compare

<a name"1.4.0">

1.4.0 (2016-12-06)

One function to rule them all

You don't need shallowToJson, mountToJson and renderToJson anymore, just use one toJson function:

import toJson from 'enzyme-to-json';

the wrapper type is now detected internally using instanceof.

Serializer

Inspired by jest-serializer-enzyme, you can now use a jest snapshot serializer with the output of enzyme-to-json.

Add this to your jest configuration:

"jest": {
  "snapshotSerializers": ["<rootDir>/node_modules/enzyme-to-json/serializer"]
}

Then you can have an Enzyme serialization without having to import or use any of the toJson functions! And it has the same output as the good old xxxxToJson helpers.

More information about the serializer in the README.md.

v1.3.0

01 Nov 17:19
Compare
Choose a tag to compare

<a name"1.3.0">

1.3.0 (2016-11-01)

Features

  • Skip undefined props in snapshot (e0105362)

v1.2.1

01 Nov 13:58
Compare
Choose a tag to compare

<a name"1.2.1">

1.2.1 (2016-11-01)

Bug Fixes

  • Don't process non-plain objects in props (#25) (3d04485e)

v1.2.0

01 Nov 10:01
Compare
Choose a tag to compare

<a name"1.2.0">

1.2.0 (2016-11-01)

Features

  • Handle elements in non-children props in shallow render (#24) (bb6239cb)

v1.1.5

24 Oct 11:32
Compare
Choose a tag to compare

<a name"1.1.5">

1.1.5 (2016-10-24)

Bug Fixes

  • Don't break when a component returns null (#23) (6125de47)

v1.1.4

12 Oct 15:47
Compare
Choose a tag to compare

<a name"1.1.4">

1.1.4 (2016-10-12)

Bug Fixes

  • Relax required Node version to include Node v4 (d62b3e92)

v1.1.3

03 Oct 16:20
Compare
Choose a tag to compare

<a name"1.1.3">

1.1.3 (2016-10-03)

Bug Fixes

  • Rewrite of all the functions, using Enzyme internal functions for better support (0e06c679)