Ran prettier fix

Signed-off-by: Mark Foresta <Mark.Foresta691@gmail.com>
This commit is contained in:
Mark Foresta
2024-10-12 13:03:11 -04:00
committed by blam
parent 2632cd74ed
commit 3b797a2d81
2 changed files with 12 additions and 8 deletions
@@ -38,7 +38,6 @@ import { BackstageCredentials } from '@backstage/backend-plugin-api';
import type { UserEntity } from '@backstage/catalog-model';
import { v4 as uuid } from 'uuid';
interface DryRunInput {
spec: TaskSpec;
templateInfo: TemplateInfo;
@@ -88,7 +87,7 @@ export function createDryRunner(options: TemplateTesterCreateOptions) {
supportsDryRun: true,
async handler(ctx) {
contentPromise = serializeDirectoryContents(ctx.workspacePath);
await contentPromise.catch(() => { });
await contentPromise.catch(() => {});
},
}),
]),
@@ -101,7 +100,7 @@ export function createDryRunner(options: TemplateTesterCreateOptions) {
}
const basePath = fileURLToPath(new URL(baseUrl));
const contentsPath = path.dirname(basePath);
const dryRunId = uuid()
const dryRunId = uuid();
const log = new Array<{ body: JsonObject }>();
@@ -78,7 +78,7 @@ describe('NunjucksWorkflowRunner', () => {
spec,
secrets,
isDryRun,
complete: async () => { },
complete: async () => {},
done: false,
emitLog: fakeTaskLog,
cancelSignal: new AbortController().signal,
@@ -636,8 +636,8 @@ describe('NunjucksWorkflowRunner', () => {
}),
getTaskState: (): Promise<
| {
state: JsonObject;
}
state: JsonObject;
}
| undefined
> => {
return Promise.resolve({
@@ -1336,7 +1336,10 @@ describe('NunjucksWorkflowRunner', () => {
const task = createMockTaskWithSpec(
{
apiVersion: 'scaffolder.backstage.io/v1beta3',
templateInfo: { entityRef: "dryRun-Entity", entity: { metadata: { name: "test-template" } } },
templateInfo: {
entityRef: 'dryRun-Entity',
entity: { metadata: { name: 'test-template' } },
},
parameters: {},
output: {},
steps: [
@@ -1357,7 +1360,9 @@ describe('NunjucksWorkflowRunner', () => {
await runner.execute(task);
expect(fakeActionHandler.mock.calls[0][0].isDryRun).toEqual(true);
expect(fakeActionHandler.mock.calls[0][0].templateInfo.entity.metadata.name).toEqual("test-template");
expect(
fakeActionHandler.mock.calls[0][0].templateInfo.entity.metadata.name,
).toEqual('test-template');
});
});