@naturalcycles/dev-lib 20.62.0 → 20.63.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
File without changes
|
|
File without changes
|
package/cfg/oxlint.config.js
CHANGED
|
@@ -467,6 +467,18 @@ export const sharedConfig = {
|
|
|
467
467
|
],
|
|
468
468
|
'vitest/max-nested-describe': [0, { max: 4 }], // not good
|
|
469
469
|
'vitest/no-alias-methods': 2,
|
|
470
|
+
'vitest/no-restricted-vi-methods': [
|
|
471
|
+
2,
|
|
472
|
+
{
|
|
473
|
+
mock: 'vi.mock() is never cleared (isolate: false) and leaks into other test files on the same worker. Spy on the module namespace instead: vi.spyOn(ns, "fn") or vi.spyOn(ns, "constName", "get").',
|
|
474
|
+
doMock:
|
|
475
|
+
'vi.doMock() is never cleared (isolate: false) and leaks into other test files on the same worker. Use vi.spyOn() on the module namespace instead.',
|
|
476
|
+
hoisted:
|
|
477
|
+
'vi.hoisted() only exists to feed vi.mock() factories, which are banned. Use vi.spyOn() instead.',
|
|
478
|
+
resetModules:
|
|
479
|
+
'vi.resetModules() clears the shared module cache for every later test file on this worker (isolate: false).',
|
|
480
|
+
},
|
|
481
|
+
],
|
|
470
482
|
'vue/no-multiple-slot-args': 2,
|
|
471
483
|
'vue/no-deprecated-destroyed-lifecycle': 2,
|
|
472
484
|
'vue/define-emits-declaration': [2, 'type-based'],
|
package/cfg/vitest.config.js
CHANGED
|
@@ -77,6 +77,9 @@ export function getSharedConfig(cwd) {
|
|
|
77
77
|
watch: false,
|
|
78
78
|
// dir: 'src',
|
|
79
79
|
restoreMocks: true,
|
|
80
|
+
// restoreMocks does not cover vi.stubEnv/vi.stubGlobal
|
|
81
|
+
unstubEnvs: true,
|
|
82
|
+
unstubGlobals: true,
|
|
80
83
|
silent,
|
|
81
84
|
setupFiles: getSetupFiles(testType, cwd),
|
|
82
85
|
logHeapUsage: true,
|