Skip to content

Commit

Permalink
Add some output (#148)
Browse files Browse the repository at this point in the history
  • Loading branch information
svanherk authored Aug 24, 2023
1 parent fb2e9e5 commit 3dd2706
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bin/d2l-test-runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 2 additions & 0 deletions src/server/cli/vdiff/migrate.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 3dd2706

Please sign in to comment.