Ragura
Ragura
NNuxt
Created by Ragura on 7/6/2024 in #❓・help
Can we prevent Playwright tests from running a build for each test?
After some trial and error I finally got Playwright to correctly run all tests. I'm happy with the state of testing, but I was wondering if it's possible to reuse builds of my SPA across tests instead of having to build the same application at the start of each test which greatly increases the total test running time. Is it not be possible to build once and serve multiple instances of the application on different ports for the tests to use?
1 replies
NNuxt
Created by Ragura on 6/15/2024 in #❓・help
Vitest auto-import functions
Is there a way to correctly auto-import functions from Vitest, like it and expect while preserving their function types and not have them show as any? I got this far using the config, which generates the imports in the imports.d.ts file, but they still show up as any in the test files.
imports: {
imports: [
{
name: 'it, expect, describe, beforeEach, afterEach',
from: 'vitest',
},
],
},
imports: {
imports: [
{
name: 'it, expect, describe, beforeEach, afterEach',
from: 'vitest',
},
],
},
6 replies