+3
-2
@@ -23,6 +23,7 @@ import { createFetchCookiecutterAction } from './cookiecutter';
|
||||
import { join } from 'path';
|
||||
import type { ActionContext } from '@backstage/plugin-scaffolder-node';
|
||||
import { createMockActionContext } from '@backstage/plugin-scaffolder-node-test-utils';
|
||||
import { Writable } from 'stream';
|
||||
|
||||
const executeShellCommand = jest.fn();
|
||||
const commandExists = jest.fn();
|
||||
@@ -166,7 +167,7 @@ describe('fetch:cookiecutter', () => {
|
||||
join(mockTmpDir, 'template'),
|
||||
'--verbose',
|
||||
],
|
||||
logStream: mockContext.logStream,
|
||||
logStream: expect.any(Writable),
|
||||
}),
|
||||
);
|
||||
});
|
||||
@@ -187,7 +188,7 @@ describe('fetch:cookiecutter', () => {
|
||||
},
|
||||
workingDir: '/input',
|
||||
envVars: { HOME: '/tmp' },
|
||||
logStream: mockContext.logStream,
|
||||
logStream: expect.any(Writable),
|
||||
}),
|
||||
);
|
||||
});
|
||||
|
||||
@@ -35,6 +35,7 @@ import { createFetchRailsAction } from './index';
|
||||
import { fetchContents } from '@backstage/plugin-scaffolder-node';
|
||||
import { createMockDirectory } from '@backstage/backend-test-utils';
|
||||
import { createMockActionContext } from '@backstage/plugin-scaffolder-node-test-utils';
|
||||
import { Writable } from 'stream';
|
||||
|
||||
describe('fetch:rails', () => {
|
||||
const mockDir = createMockDirectory();
|
||||
@@ -104,7 +105,7 @@ describe('fetch:rails', () => {
|
||||
|
||||
expect(mockRailsTemplater.run).toHaveBeenCalledWith({
|
||||
workspacePath: mockContext.workspacePath,
|
||||
logStream: mockContext.logStream,
|
||||
logStream: expect.any(Writable),
|
||||
values: mockContext.input.values,
|
||||
});
|
||||
});
|
||||
@@ -120,7 +121,7 @@ describe('fetch:rails', () => {
|
||||
|
||||
expect(mockRailsTemplater.run).toHaveBeenCalledWith({
|
||||
workspacePath: mockContext.workspacePath,
|
||||
logStream: mockContext.logStream,
|
||||
logStream: expect.any(Writable),
|
||||
values: {
|
||||
...mockContext.input.values,
|
||||
imageName: 'foo/rails-custom-image',
|
||||
|
||||
Reference in New Issue
Block a user