@@ -59,7 +59,7 @@ describe('command entrypoint', () => {
|
||||
|
||||
test('should call expected tasks with no path option', async () => {
|
||||
const cmd = {} as unknown as Command;
|
||||
await createApp(cmd);
|
||||
await createApp(cmd, '1.0.0');
|
||||
expect(checkAppExistsMock).toHaveBeenCalled();
|
||||
expect(createTemporaryAppFolderMock).toHaveBeenCalled();
|
||||
expect(templatingMock).toHaveBeenCalled();
|
||||
@@ -69,7 +69,7 @@ describe('command entrypoint', () => {
|
||||
|
||||
it('should call expected tasks with path option', async () => {
|
||||
const cmd = { path: 'myDirectory' } as unknown as Command;
|
||||
await createApp(cmd);
|
||||
await createApp(cmd, '1.0.0');
|
||||
expect(checkPathExistsMock).toHaveBeenCalled();
|
||||
expect(templatingMock).toHaveBeenCalled();
|
||||
expect(buildAppMock).toHaveBeenCalled();
|
||||
@@ -77,7 +77,7 @@ describe('command entrypoint', () => {
|
||||
|
||||
it('should not call `buildAppTask` when `skipInstall` is supplied', async () => {
|
||||
const cmd = { skipInstall: true } as unknown as Command;
|
||||
await createApp(cmd);
|
||||
await createApp(cmd, '1.0.0');
|
||||
expect(buildAppMock).not.toHaveBeenCalled();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -195,9 +195,12 @@ describe('templatingTask', () => {
|
||||
name: 'SuperCoolBackstageInstance',
|
||||
dbTypeSqlite: true,
|
||||
};
|
||||
await templatingTask(templateDir, destinationDir, context);
|
||||
await templatingTask(templateDir, destinationDir, context, '1.0.0');
|
||||
expect(fs.existsSync('templatedApp/package.json')).toBe(true);
|
||||
expect(fs.existsSync('templatedApp/.dockerignore')).toBe(true);
|
||||
await expect(fs.readJson('templatedApp/backstage.json')).resolves.toEqual({
|
||||
version: '1.0.0',
|
||||
});
|
||||
// catalog was populated with `context.name`
|
||||
expect(
|
||||
fs.readFileSync('templatedApp/catalog-info.yaml', 'utf-8'),
|
||||
|
||||
Reference in New Issue
Block a user