diff --git a/plugins/scaffolder-backend/src/scaffolder/tasks/NunjucksWorkflowRunner.test.ts b/plugins/scaffolder-backend/src/scaffolder/tasks/NunjucksWorkflowRunner.test.ts index 1cf3f90774..6b1701380b 100644 --- a/plugins/scaffolder-backend/src/scaffolder/tasks/NunjucksWorkflowRunner.test.ts +++ b/plugins/scaffolder-backend/src/scaffolder/tasks/NunjucksWorkflowRunner.test.ts @@ -561,36 +561,6 @@ describe('DefaultWorkflowRunner', () => { describe('user', () => { it('allows access to the user entity at the templating level', async () => { - const task = createMockTaskWithSpec({ - apiVersion: 'scaffolder.backstage.io/v1beta3', - steps: [ - { - id: 'test', - name: 'name', - action: 'output-action', - input: {}, - }, - ], - output: { - foo: '${{ parameters.repoUrl | parseRepoUrl }}', - }, - parameters: { - repoUrl: 'github.com?repo=repo&owner=owner', - }, - }); - - const { output } = await runner.execute(task); - - expect(output.foo).toEqual({ - host: 'github.com', - owner: 'owner', - repo: 'repo', - }); - }); - }); - - describe('filters', () => { - it('provides the parseRepoUrl filter', async () => { const task = createMockTaskWithSpec({ apiVersion: 'scaffolder.backstage.io/v1beta3', steps: [ @@ -618,4 +588,34 @@ describe('DefaultWorkflowRunner', () => { expect(output.foo).toEqual('bob user:default/guest'); }); }); + + describe('filters', () => { + it('provides the parseRepoUrl filter', async () => { + const task = createMockTaskWithSpec({ + apiVersion: 'scaffolder.backstage.io/v1beta3', + steps: [ + { + id: 'test', + name: 'name', + action: 'output-action', + input: {}, + }, + ], + output: { + foo: '${{ parameters.repoUrl | parseRepoUrl }}', + }, + parameters: { + repoUrl: 'github.com?repo=repo&owner=owner', + }, + }); + + const { output } = await runner.execute(task); + + expect(output.foo).toEqual({ + host: 'github.com', + owner: 'owner', + repo: 'repo', + }); + }); + }); });