Skip to content

Commit

Permalink
feat: binary wrapper around @web/dev-server to host the report (#112)
Browse files Browse the repository at this point in the history
  • Loading branch information
dlockhart authored Aug 2, 2023
1 parent a0fec8a commit 4fdf1e4
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
15 changes: 15 additions & 0 deletions bin/d2l-test-vdiff-report.js
Original file line number Diff line number Diff line change
@@ -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
});
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 4fdf1e4

Please sign in to comment.