React package (#105)
* init new react package project * setup react package * Fix config for build * update package * Fix build * update package * fix package.json * refactor and cleanup * bumb beta version * fix regex * bump version * Add hashing * Add tests * bump version * Add peer dependecies * Add docs * Add readme link
This commit is contained in:
27
packages/lucide-react/tests/lucide-react.spec.js
Normal file
27
packages/lucide-react/tests/lucide-react.spec.js
Normal file
@@ -0,0 +1,27 @@
|
||||
import React from 'react';
|
||||
import renderer from 'react-test-renderer';
|
||||
import { Grid } from '..'
|
||||
|
||||
describe('Using lucide icon components', () => {
|
||||
it('should render an component', () => {
|
||||
const component = renderer.create(
|
||||
<Grid/>,
|
||||
);
|
||||
|
||||
let tree = component.toJSON();
|
||||
expect(tree).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it('should adjust the size, stroke color and stroke width', () => {
|
||||
const component = renderer.create(
|
||||
<Grid
|
||||
size={48}
|
||||
stroke="red"
|
||||
strokeWidth={4}
|
||||
/>,
|
||||
);
|
||||
|
||||
let tree = component.toJSON();
|
||||
expect(tree).toMatchSnapshot();
|
||||
});
|
||||
})
|
||||
Reference in New Issue
Block a user