11import { randomUUID } from 'crypto'
22import { describe , expect , it } from 'vitest'
33
4- import vaultWorkspace from '@/apps/vault-workspace'
54import ExecutionStep from '@/models/execution-step'
65
76import computeParameters from '../compute-parameters'
@@ -280,10 +279,10 @@ describe('compute parameters', () => {
280279 } )
281280
282281 it ( 'should work with space separated keys' , ( ) => {
283- const vaultWSExecutionStep = [
282+ const executionStep = [
284283 {
285284 stepId : randomStepID ,
286- appKey : vaultWorkspace . key ,
285+ appKey : 'test-app' ,
287286 dataOut : {
288287 ' weopfkweopf ' : 'Itsa me' ,
289288 'weiofjwef wefwe fwe fwefwe f ' : 'Mario!' ,
@@ -296,15 +295,15 @@ describe('compute parameters', () => {
296295 const expected = {
297296 toSubstitute : 'Itsa me Mario!' ,
298297 }
299- const result = computeParameters ( params , vaultWSExecutionStep )
298+ const result = computeParameters ( params , executionStep )
300299 expect ( result ) . toEqual ( expected )
301300 } )
302301
303302 it ( 'should not replace parameters with tabs or newlines' , ( ) => {
304- const vaultWSExecutionStep = [
303+ const executionStep = [
305304 {
306305 stepId : randomStepID ,
307- appKey : vaultWorkspace . key ,
306+ appKey : 'test-app' ,
308307 dataOut : {
309308 '\tab tab\t' : 'Itsa me' ,
310309 'newlines\n' : 'Mario!' ,
@@ -317,7 +316,7 @@ describe('compute parameters', () => {
317316 const expected = {
318317 toSubstitute : `{{step.${ randomStepID } .\tab tab\t}} {{step.${ randomStepID } .newlines\n}}` ,
319318 }
320- const result = computeParameters ( params , vaultWSExecutionStep )
319+ const result = computeParameters ( params , executionStep )
321320 expect ( result ) . toEqual ( expected )
322321 } )
323322} )
0 commit comments