Skip to content

Commit 934781b

Browse files
authored
Fix rollup (#4)
* Fix rollup build * Fix lint
1 parent 5ac357b commit 934781b

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

rollup.config.js renamed to rollup.config.mjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { terser } from 'rollup-plugin-terser';
66
import filesize from 'rollup-plugin-filesize';
77
import replace from 'rollup-plugin-replace';
88

9-
import pkg from './package.json';
9+
import pkg from './package.json' assert { type: 'json' };
1010

1111
const dependencies = Object.keys(pkg.dependencies).concat(
1212
Object.keys(pkg.peerDependencies || {}),
@@ -28,7 +28,7 @@ function isExternal(id) {
2828
export default [
2929
// browser-friendly UMD build
3030
{
31-
input: 'src/index.ts',
31+
input: 'src/index.tsx',
3232
external: isExternal,
3333
output: [{ file: pkg.unpkg, format: 'umd', name: 'react-wizard-flow' }],
3434
plugins: [
@@ -47,7 +47,7 @@ export default [
4747
},
4848
// node-friendly commonjs build
4949
{
50-
input: 'src/index.ts',
50+
input: 'src/index.tsx',
5151
external: isExternal,
5252
output: [{ file: pkg.main, format: 'cjs' }],
5353
plugins: [

src/__tests__/index.test.tsx

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ describe('#react-wizard-flow', () => {
4848
<TestWizardFlow.Provider initialStep={TestSteps.step1} steps={STEPS} />,
4949
);
5050
expect(getByText('Step 1')).toBeVisible();
51-
fireEvent.click(getByText("To Step 2"));
51+
fireEvent.click(getByText('To Step 2'));
5252
expect(getByText('Step 2')).toBeVisible();
5353
const results = await axe(container);
5454
expect(results).toHaveNoViolations();
@@ -57,11 +57,15 @@ describe('#react-wizard-flow', () => {
5757
it('should have a functioning close callback', async () => {
5858
const handleClose = jest.fn();
5959
const { container, getByText } = render(
60-
<TestWizardFlow.Provider initialStep={TestSteps.step1} steps={STEPS} onClose={handleClose} />,
60+
<TestWizardFlow.Provider
61+
initialStep={TestSteps.step1}
62+
steps={STEPS}
63+
onClose={handleClose}
64+
/>,
6165
);
6266
expect(getByText('Step 1')).toBeVisible();
6367
expect(handleClose.mock.calls).toHaveLength(0);
64-
fireEvent.click(getByText("Close"));
68+
fireEvent.click(getByText('Close'));
6569
expect(getByText('Step 1')).toBeVisible();
6670
expect(handleClose.mock.calls).toHaveLength(1);
6771
const results = await axe(container);
@@ -74,10 +78,10 @@ describe('#react-wizard-flow', () => {
7478
<TestWizardFlow.Provider initialStep={TestSteps.step1} steps={STEPS} />,
7579
);
7680
expect(getByText('Step 1')).toBeVisible();
77-
fireEvent.click(getByText("Close"));
81+
fireEvent.click(getByText('Close'));
7882
expect(getByText('Step 1')).toBeVisible();
7983
const results = await axe(container);
8084
expect(results).toHaveNoViolations();
81-
}).not.toThrow()
85+
}).not.toThrow();
8286
});
8387
});

0 commit comments

Comments
 (0)