Skip to content

Commit

Permalink
Changes test
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsi15 committed Jan 29, 2024
1 parent 3402596 commit 681ce2b
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 10 deletions.
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
"prepare": "dts build",
"size": "size-limit",
"start": "dts watch",
"test": "dts test --passWithNoTests"
"test": "dts test --passWithNoTests",
"test:watch": "dts test --watch",
"test:coverage": "dts test --coverage"
},
"husky": {
"hooks": {
Expand Down
14 changes: 8 additions & 6 deletions test/index.test.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import { Thing } from '../src/index';
import { createRoot } from 'react-dom/client';
import { ProgressiveCounter } from '../src/index';

describe('Thing', () => {
describe('Progressive Counter', () => {
it('renders without crashing', () => {
const div = document.createElement('div');
ReactDOM.render(<Thing />, div);
ReactDOM.unmountComponentAtNode(div);
const container = document.createElement('div');
console.log(React);
const root = createRoot(container!);
root.render(<ProgressiveCounter initialValue={0} finalValue={299.89} />);
root.unmount();
});
});
10 changes: 7 additions & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
// see https://www.typescriptlang.org/tsconfig to better understand tsconfigs
"extends": "@tsconfig/vite-react/tsconfig.json",
"compilerOptions": {
"allowImportingTsExtensions": false
"allowImportingTsExtensions": false,
"esModuleInterop": true
},
"include": ["src", "types"]
}
"include": [
"src",
"types"
]
}

0 comments on commit 681ce2b

Please sign in to comment.