Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: binary wrapper around @web/dev-server to host the report #112

Merged
merged 1 commit into from
Aug 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might want to ditch this too.

"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"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed test:vdiff:golden since the npm run test:vdiff -- --golden seems just as good?

"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