fix comments

Signed-off-by: Vincenzo Scamporlino <me@vinzscam.dev>
This commit is contained in:
Vincenzo Scamporlino
2021-11-15 16:32:46 +01:00
parent b6b4d4b73f
commit 677bfc2dd0
8 changed files with 32 additions and 19 deletions
+3 -3
View File
@@ -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();
});
});
+4 -1
View File
@@ -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'),