Skip to content

Commit 0bf68cf

Browse files
committed
Fix tests
1 parent 48cfa37 commit 0bf68cf

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-mathlive",
3-
"version": "3.0.5-preview",
3+
"version": "3.0.5-preview.1",
44
"description": "An interactive math input for react.",
55
"main": "dist/index.js",
66
"files": [

src/MathfieldComponent.test.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ import {
66
waitForElement,
77
} from '@testing-library/react';
88
import { MathfieldComponent, combineConfig } from './MathfieldComponent';
9-
import { Mathfield } from 'mathlive';
9+
// @ts-ignore
10+
import Mathlive from 'mathlive/dist/mathlive';
1011

1112
afterEach(cleanup);
1213

@@ -19,13 +20,13 @@ describe("combineConfig", () => {
1920
latex: "fubar",
2021
onChange: v => value1 = v,
2122
mathfieldConfig: {
22-
onContentDidChange: mf => value2 = mf.$latex(),
23+
onContentDidChange: (mf: Mathlive.Mathfield) => value2 = mf.$latex(),
2324
},
2425
});
2526

2627
const mockMathField = {
2728
$latex: () => "bar",
28-
} as Mathfield;
29+
} as Mathlive.Mathfield;
2930

3031
combinedConfig.onContentDidChange!(mockMathField);
3132

tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"strict": true,
1010
"declaration": true,
1111
"sourceMap": true,
12+
"esModuleInterop": true,
1213
"jsx": "react",
1314
"typeRoots": [
1415
"index.d.ts",

0 commit comments

Comments
 (0)