mirror of
https://github.com/josdejong/mathjs.git
synced 2025-12-08 19:46:04 +00:00
docs: document how to run tests for the type definitions
This commit is contained in:
parent
599f4ee804
commit
49df88985e
@ -160,6 +160,10 @@ Then, the tests can be executed:
|
||||
|
||||
npm test
|
||||
|
||||
To test the type definitions:
|
||||
|
||||
npm run test:types
|
||||
|
||||
Additionally, the tests can be run on FireFox using [headless mode](https://developer.mozilla.org/en-US/Firefox/Headless_mode):
|
||||
|
||||
npm run test:browser
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Mathjs TypeScript types
|
||||
|
||||
The code base of Mathjs is writting in JavaScript. The TypeScript definitions are maintained separately.
|
||||
The code base of Mathjs is written in JavaScript. The TypeScript definitions are maintained separately.
|
||||
|
||||
## Library structure
|
||||
|
||||
@ -52,3 +52,15 @@ export const {
|
||||
// ...
|
||||
} : Record<string, FactoryFunctionMap>
|
||||
```
|
||||
|
||||
## Testing the type definitions
|
||||
|
||||
The types are defined in `types/index.d.ts`.
|
||||
|
||||
The tests for the type definitions are located in `test/typescript-types/testTypes.ts`.
|
||||
|
||||
To run the tests for the type definitions:
|
||||
|
||||
```
|
||||
npm run test:types
|
||||
```
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user