Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Updated enzyme config, tests pass now.
  • Loading branch information
Sean Walker committed Jun 29, 2022
commit 2fe7544b1797489f219ad3c8a4ed5def84ad58c6
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ Property | Type | Description
**id** | *string* | ID attribute of button element.
**className** | *string* | Class attribute of button element.
**buttonText** | *string* | Button text.
**children** | *element* | Child elements to render instead of the button text.


## Example
Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"scripts": {
"build": "./node_modules/.bin/babel ./src/ReactHTMLTableToExcel.jsx -o index.js",
"prepublish": "npm run build",
"client:test": "NODE_ENV=test jest",
"client:test:watch": "NODE_ENV=test jest --watch"
"client:test": "jest",
"client:test:watch": "jest --watch"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -50,6 +50,7 @@
"chai": "^3.5.0",
"chai-enzyme": "^1.0.0-beta.1",
"enzyme": "^3.11.0",
"enzyme-adapter-react-16": "^1.15.6",
"eslint": "^8.18.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-plugin-import": "^2.2.0",
Expand All @@ -64,4 +65,4 @@
"dependencies": {
"prop-types": "^15.8.1"
}
}
}
4 changes: 4 additions & 0 deletions test/index.test.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
import React from 'react';
import chai, { expect } from 'chai';
import chaiEnzyme from 'chai-enzyme';
import { configure } from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
import { shallow } from 'enzyme';
import sinon from 'sinon';
import ReactHTMLTableToExcel from '../src/ReactHTMLTableToExcel';

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

chai.use(chaiEnzyme());

const props = {
Expand Down