houdini/javascripts/src/components/common/Spinner.spec.tsx

24 lines
644 B
TypeScript
Raw Normal View History

2019-04-19 20:27:56 +00:00
// License: LGPL-3.0-or-later
import * as React from 'react';
import 'jest';
import Spinner from './Spinner'
import { mount } from 'enzyme';
import toJson from 'enzyme-to-json';
describe('Spinner', () => {
test('is small', () => {
expect(toJson(mount(<Spinner size="small"/>))).toMatchSnapshot()
})
test('is normal', () => {
expect(toJson(mount(<Spinner size="normal"/>))).toMatchSnapshot()
})
test('is large', () => {
expect(toJson(mount(<Spinner size="large"/>))).toMatchSnapshot()
})
test('has customcolor ', () => {
expect(toJson(mount(<Spinner size="small" color={"#ffffff"}/>))).toMatchSnapshot()
})
})