From bf4d1750d1dd4873718142087c66be45dd13ed44 Mon Sep 17 00:00:00 2001 From: Stacey Van Herk <13419300+svanherk@users.noreply.github.com> Date: Thu, 24 Aug 2023 14:55:18 -0400 Subject: [PATCH] Add some output --- bin/d2l-test-runner.js | 3 +++ src/server/cli/vdiff/migrate.js | 2 ++ 2 files changed, 5 insertions(+) diff --git a/bin/d2l-test-runner.js b/bin/d2l-test-runner.js index 99feeda5..36b97234 100755 --- a/bin/d2l-test-runner.js +++ b/bin/d2l-test-runner.js @@ -26,8 +26,11 @@ if (cli.subcommand === 'vdiff') { const { pattern = './**' } = commandLineArgs({ name: 'pattern', type: String, defaultOption: true }, { partial: true, argv: vdiff._unknown || [] }); + stdout.write('\nInstalling @brightspace-ui/visual-diff\n'); execSync('npm install @brightspace-ui/visual-diff@14 --no-save'); + stdout.write(`\nRunning existing tests for pattern '${pattern}/*.visual-diff.js'\n`); execSync(`npx mocha '${pattern}/*.visual-diff.js' -t 10000 --golden`); + stdout.write('\nTest run complete.\n'); const { migrate } = await import('../src/server/cli/vdiff/migrate.js'); await migrate.start(vdiff._unknown, true); diff --git a/src/server/cli/vdiff/migrate.js b/src/server/cli/vdiff/migrate.js index 863a261c..0e44cbce 100755 --- a/src/server/cli/vdiff/migrate.js +++ b/src/server/cli/vdiff/migrate.js @@ -9,6 +9,8 @@ import { stdout } from 'node:process'; async function start(argv = [], local = false) { const { pattern = './**' } = commandLineArgs({ name: 'pattern', type: String, defaultOption: true }, { partial: true, argv }); const oldSuffix = local ? 'screenshots/golden' : 'screenshots/ci/golden'; + + stdout.write(`\nMigrating goldens for pattern '${pattern}/${oldSuffix}'\n`); const dirs = await glob(`${pattern}/${oldSuffix}`, { ignore: 'node_modules/**', posix: true }); let fileCount = 0;