import React from 'react' import TestRenderer from 'react-test-renderer' import { Mesh, BoxBufferGeometry, MeshNormalMaterial, Line, New, Primitive } from '.' describe('components', () => { test('mesh example matches snapshot', () => { expect( TestRenderer.create( console.log(mesh.geometry)} onClick={() => console.log('click')} onPointerOver={() => console.log('hover')} onPointerOut={() => console.log('unhover')}> ) ).toMatchSnapshot() }) test('components.Line can be used instead of line instrinsic element', () => { const actual = TestRenderer.create().toJSON() const expected = TestRenderer.create().toJSON() // eslint-disable-next-line @typescript-eslint/no-non-null-assertion expect(actual).toStrictEqual(expected!) }) test('Primitive matches snapshot', () => { const object = { a: 10, b: 20 } expect(TestRenderer.create()).toMatchSnapshot() }) test('New matches snapshot', () => { class SpecialThing { constructor(public foo: number, _: string) {} } expect(TestRenderer.create()).toMatchSnapshot() }) })