1.1.0 • Published 6 years ago

three-snapshot-serializer v1.1.0

Weekly downloads
96
License
-
Repository
github
Last release
6 years ago

three-snapshot-serializer

Jest snapshot serializer for THREE objects

Usage

$ npm install three-snapshot-serializer --save-dev

To use for all test files, add the following to package.json:

{
  "jest": {
    "snapshotSerializers": ["three-snapshot-serializer"]
  }
}

To use in one test file:

import { createSerializer } from 'three-snapshot-serializer';

expect.addSnapshotSerializer(createSerializer({ dropUUIDs: true }));

To use in one assertion:

import { toJSON } from 'three-snapshot-serializer';

expect(toJSON(obj)).matchesSnapshot();
1.1.0

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago