Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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();

About

Jest snapshot serializer for THREE objects

Topics

Resources

Stars

4 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages