Skip to content

Commit

Permalink
Merge branch 'main' into emmercm/20230825-gha-efficiency
Browse files Browse the repository at this point in the history
  • Loading branch information
emmercm authored Aug 26, 2023
2 parents 550400e + 0463bbf commit 527907c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/console/logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export default class Logger {
const chalkFunc = chalkFuncs[logLevel];

const loggerTime = this.logLevel <= LogLevel.TRACE ? `[${moment().format('HH:mm:ss.SSS')}] ` : '';
const levelPrefix = chalkFunc(`${LogLevel[logLevel]}:${' '.repeat(Math.max(5 - LogLevel[logLevel].length, 0))} `);
const levelPrefix = `${chalkFunc(LogLevel[logLevel])}:${' '.repeat(Math.max(5 - LogLevel[logLevel].length, 0))} `;
const loggerPrefix = this.logLevel <= LogLevel.INFO && this.loggerPrefix ? `${this.loggerPrefix}: ` : '';

return message
Expand Down
10 changes: 9 additions & 1 deletion test/modules/candidateWriter.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,21 +115,29 @@ async function romWriter(
return walkAndStat(outputTemp);
}

// TODO(cemmer): why does this hang on Windows in CI?
it('should not do anything if there are no parents', async () => {
await copyFixturesToTemp(async (inputTemp, outputTemp) => {
console.log(inputTemp, outputTemp);

// Given
const options = new Options({ commands: ['copy'] });
console.log(options);
const inputFilesBefore = await walkAndStat(inputTemp);
console.log(inputFilesBefore);
await expect(walkAndStat(outputTemp)).resolves.toHaveLength(0);

// When
await romWriter(options, os.devNull, '**/*', undefined, outputTemp);
const output = await romWriter(options, os.devNull, '**/*', undefined, outputTemp);
console.log(output);

// Then no files were written
await expect(walkAndStat(outputTemp)).resolves.toHaveLength(0);
console.log('output is empty');

// And the input files weren't touched
await expect(walkAndStat(inputTemp)).resolves.toEqual(inputFilesBefore);
console.log('input is unchanged');
});
});

Expand Down

0 comments on commit 527907c

Please sign in to comment.