From 8ab10dda1b8e6461ed5392baa4d6ceb9bf28f286 Mon Sep 17 00:00:00 2001 From: Jtubau Date: Wed, 18 Dec 2024 08:07:44 +0100 Subject: [PATCH] refactor: refs #7074 move dms constant to global scope --- .../__tests__/components/common/VnDmsList.spec.js | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/test/vitest/__tests__/components/common/VnDmsList.spec.js b/test/vitest/__tests__/components/common/VnDmsList.spec.js index 49228ddf8..9649943a2 100644 --- a/test/vitest/__tests__/components/common/VnDmsList.spec.js +++ b/test/vitest/__tests__/components/common/VnDmsList.spec.js @@ -4,6 +4,10 @@ import { vi, afterEach, beforeAll, describe, expect, it } from 'vitest'; describe('VnDmsList', () => { let vm; + const dms = { + userFk: 1, + name: 'DMS 1' + }; beforeAll(() => { vi.spyOn(axios, 'get').mockResolvedValue({ data: [] }); @@ -63,11 +67,6 @@ describe('VnDmsList', () => { }); describe('parseDms()', () => { - const dms = { - userFk: 1, - name: 'DMS 1' - }; - const resultDms = { ...dms, userId:1}; it('Should add properties that end with "Fk" by changing the suffix to "Id"', () => { @@ -77,11 +76,6 @@ describe('VnDmsList', () => { }); describe('showFormDialog()', () => { - const dms = { - userFk: 1, - name: 'DMS 1' - }; - const resultDms = { ...dms, userId:1}; it('should call fn parseDms() and set show true if dms is defined', () => {