Icontem

File: __tests__/Arc.test.js

Recommend this page to a friend!
  Classes of Manolo Salsas  >  React JS SVG Library  >  __tests__/Arc.test.js  >  Download  
File: __tests__/Arc.test.js
Role: Example script
Content type: text/plain
Description: Example script
Class: React JS SVG Library
Generate animated graphics in SVG using React JS
Author: By
Last change:
Date: 7 months ago
Size: 675 bytes
 

Contents

Class file image Download
import React from 'react';
import Arc from '../src/Arc';
import { shallow, configure } from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';

configure({adapter: new Adapter()});

describe('Test Arc component', () => {
    const props = {
        radius       : 80,
        degreesOffset: 0,
        degrees      : 270,
        strokeWidth  : 20,
        strokeColor  : 'orange',
        fillColor    : 'none',
        strokeLinecap: 'butt'
    };
    const arc = shallow((<Arc {...props}/>));

    it('should be defined', () => {
        expect(arc).toBeDefined();
    });
    it('should render correctly', () => {
        expect(arc).toMatchSnapshot();
    });
});