Closed ojemuyiwa closed 1 year ago
Ignore i'm just going to / istanbul ignore file / everything and mock the component, been 2 days trying to test this
Thanks for reporting. It's not entirely clear to me what causes these difficulties in your setup. Is it the translation from the plain JavaScript example to TypeScript? Or is it related to a setup with specific strict code style requirements? The code is quite standard React and JavaScript style, there is nothing "weird" going on there.
As for a TypeScript example, see: https://github.com/josdejong/svelte-jsoneditor/blob/main/README-VANILLA.md#typescript
Thanks for reporting. It's not entirely clear to me what causes these difficulties in your setup. Is it the translation from the plain JavaScript example to TypeScript? Or is it related to a setup with specific strict code style requirements? The code is quite standard React and JavaScript style, there is nothing "weird" going on there.
As for a TypeScript example, see: https://github.com/josdejong/svelte-jsoneditor/blob/main/README-VANILLA.md#typescript
Unsure myself, just doesn't compile for jest tests using NX Cli, i've exempted it from tests. Thanks anyways and much appreciated. 👍
Using react typescript
npm install
vanilla-jsoneditor
added from documentation example
import the above file and run jest tests where the above is used causes