This sets retry globally to `3`, so we don't have to add it to the tests individually.
For the tests that are reliable this shouldn't have any effect, but it will trigger on tests that proved to be a bit flakey (like revisit tests).
It was necessary to do a bit of plumbing to get typescript, webpack &
vitest all happy. To do this we had had to create a separate tsconfig
for the on-prem version and the service frontend.
We override the module resolution for both config files. For on-prem we
check modules in `pkg/lib` and for the service we resolve the modules to
stub functions of the `cockpit` & `cockpit/fsinfo` modules. This was so
typescript and webpack would not complain.
For on-prem we had to intruct webpack to resolve modules from both
`node_modules` and `pkg/lib`. While for the service we set the
resulotion for the two modules to false, which means they won't get
bundled with the service.
Lastly, we needed to set some aliases in the vitest config so that
vitest could resolve the `cockpit` & `cockpit/fsinfo` modules.
Using the cjs `require` keyword to import cockpit would have worked to
make typescript and webpack compile since these imports are not
statically analysed like the `import` keyword is. However, this approach
broke the tests as `require` imports are not supported in vitest.
`@monaco-editor` needs to be inlined in order to run the tests smoothly without any errors.
Note: dependencies include both `@monaco-editor` and `monaco-editor`, only the `@` one needs to be inlined in test dependencies.
This bumps:
- vitest from 2.0.4 to 2.0.5
- @vitest/coverage-v8 from 2.0.4 to 2.0.5
and removes reporter from the coverage setting, leaving only default output for now (console output equal to jest).