Upgrade vitest to v1 and fix test definitions
This commit upgrades the `vitest` library to its first major version (v1) resolving issues with previously unexecuted tests due to improperly nested `it` blocks. The migration to v1 uncovered error messages indicating the misuse of `it` blocks, as described in vitest-dev/vitest#4229 and vitest-dev/vitest#4262, prompting a restructuring of test cases for proper execution. Additionally, this commit adjusts singleton test definitions in `DependencyProvider.spec.ts` to better reflect real usage scenarios and correctly implement singleton pattern tests, enhancing test reliability. Changes: - Upgrade `vitest` from v0 to v1. - Correct test definitions by organizing `it` blocks within `describe` blocks. - Fix singleton test definition in `DependencyProvider.spec.ts`.
This commit is contained in:
@@ -10,7 +10,7 @@ import type { TreeInputNodeData } from '@/presentation/components/Scripts/View/T
|
||||
|
||||
describe('TreeNodeInitializerAndUpdater', () => {
|
||||
describe('updateRootNodes', () => {
|
||||
it('should throw an error if no data is provided', () => {
|
||||
describe('should throw an error if no data is provided', () => {
|
||||
itEachAbsentCollectionValue<TreeInputNodeData>((absentValue) => {
|
||||
// arrange
|
||||
const expectedError = 'missing data';
|
||||
|
||||
Reference in New Issue
Block a user