Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 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
36 changes: 36 additions & 0 deletions common/tools/dev-tool/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,42 @@ It provides a place to centralize scripts, resources, and processes for developm
- `prep` (prepare samples for local source-linked execution)
- `run` (execute a sample or all samples within a directory)
- `check-node-versions` (execute samples with different node versions, typically in preparation for release)
- `test-proxy`
- `start` (start the test-proxy tool. This requires docker.)
- `wait-for-proxy-endpoint` (waits until the proxy endpoint is ready or aborts in 120 seconds, whichever happens first)
- `run`

- `test:node-ts-input` (runs the node tests with TS input files with the default mocha configs, and concurrently runs the proxy tool in record/playback modes if it is not already active)

- Mocha settings added by default

> `-r esm -r ts-node/register --reporter ../../../common/tools/mocha-multi-reporter.js --full-trace`

- Example usage


Comment thread
HarshaNalluru marked this conversation as resolved.
Outdated
```bash
dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.spec.ts'
```
- `test:node-js-input` (runs the node tests with JS input files with the default mocha configs, and concurrently runs the proxy tool in record/playback modes if it is not already active)

- Mocha settings added by default

> `-r esm --require source-map-support/register --reporter ../../../common/tools/mocha-multi-reporter.js --full-trace`

- Also, calls mocha with `nyc` for code coverage

- Example usage

```bash
dev-tool run test:node-js-input -- --timeout 5000000 "dist-esm/test/{,!(browser)/**/}/*.spec.js"
```

- `test:browser` (runs the browser tests using karma, and concurrently runs the proxy tool in record/playback modes if it is not already active)
- Example usage
```bash
dev-tool run test:browser
```

The `dev-tool about` command will print some information about how to use the command. All commands additionally accept the `--help` argument, which will print information about the usage of that specific command. For example, to show help information for the `resolve` command above, issue the command `dev-tool package resolve --help`.

Expand Down
2 changes: 1 addition & 1 deletion sdk/test-utils/recorder-new/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"format": "prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"",
"integration-test:browser": "concurrently \"npm run tests:server\" \"npm run test:browser-with-proxy\" --kill-others --success first",
"integration-test:node": "concurrently \"npm run tests:server\" \"npm run test:node-with-proxy\" --kill-others --success first",
"test:node-with-proxy": "dev-tool run test:node-ts-input --mocha=\"--timeout 1200000 'test/*.spec.ts'\"",
"test:node-with-proxy": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.spec.ts'",
Comment thread
HarshaNalluru marked this conversation as resolved.
Outdated
"test:browser-with-proxy": "dev-tool run test:browser",
"integration-test": "npm run integration-test:node && npm run integration-test:browser",
"tests:server": "cross-env TS_NODE_COMPILER_OPTIONS=\"{\\\"module\\\": \\\"commonjs\\\"}\" ts-node test/utils/server.ts",
Expand Down
2 changes: 1 addition & 1 deletion sdk/test-utils/testing-recorder-new/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"extract-api": "echo skipped",
"format": "prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"",
"integration-test:browser": "dev-tool run test:browser",
"integration-test:node": "dev-tool run test:node-ts-input --mocha=\"--timeout 1200000 'test/*.spec.ts'\"",
"integration-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.spec.ts'",
Comment thread
HarshaNalluru marked this conversation as resolved.
Outdated
"integration-test": "npm run integration-test:node && npm run integration-test:browser",
"lint:fix": "eslint package.json src test --ext .ts --fix --fix-type [problem,suggestion]",
"lint": "eslint package.json src test --ext .ts -f html -o recorder-lintReport.html || exit 0",
Expand Down