diff --git a/bin/d2l-test-vdiff-report.js b/bin/d2l-test-vdiff-report.js new file mode 100755 index 00000000..3ee7b9a9 --- /dev/null +++ b/bin/d2l-test-vdiff-report.js @@ -0,0 +1,15 @@ +#!/usr/bin/env node +import { PATHS } from '../src/server/visual-diff-plugin.js'; +import { startDevServer } from '@web/dev-server'; + +await startDevServer({ + config: { + nodeResolve: false, + open: `./${PATHS.REPORT_ROOT}/`, + rootDir: `${PATHS.VDIFF_ROOT}`, + preserveSymlinks: false, + watch: true + }, + readCliArgs: false, + readFileConfig: false +}); diff --git a/package.json b/package.json index 2ecc55df..e3a1def5 100644 --- a/package.json +++ b/package.json @@ -6,16 +6,16 @@ "repository": "https://github.com/BrightspaceUI/testing.git", "scripts": { "lint": "eslint . --ext .js", - "start": "web-dev-server --root-dir ./.vdiff --open ./.report/", + "start": "npx d2l-test-vdiff-report", "test": "npm run lint && npm run test:bin && npm run test:server && npm run test:browser", "test:bin": "mocha './test/bin/**/*.test.js'", "test:browser": "npx d2l-test-runner --files './test/browser/**/*.test.js'", "test:server": "mocha './test/server/**/*.test.js'", - "test:vdiff": "npx d2l-test-runner --config ./test/browser/vdiff.config.js --group vdiff", - "test:vdiff:golden": "npm run test:vdiff -- --golden" + "test:vdiff": "npx d2l-test-runner --config ./test/browser/vdiff.config.js --group vdiff" }, "bin": { "d2l-test-runner": "./bin/d2l-test-runner.js", + "d2l-test-vdiff-report": "./bin/d2l-test-vdiff-report.js", "migrate-goldens": "./bin/migrate-goldens.js" }, "author": "D2L Corporation",