diff options
author | 2022-01-26 22:05:03 -0800 | |
---|---|---|
committer | 2022-01-26 22:05:03 -0800 | |
commit | b088d810701fcf7d2d0a3b6bb4035d06fb329247 (patch) | |
tree | 39bcd95a5c20b8d4f18fdfb309841e62a67a3382 | |
parent | 205e9e462e3b6bdaabfb9497a6178f2544e513b1 (diff) | |
download | astro-b088d810701fcf7d2d0a3b6bb4035d06fb329247.tar.gz astro-b088d810701fcf7d2d0a3b6bb4035d06fb329247.tar.zst astro-b088d810701fcf7d2d0a3b6bb4035d06fb329247.zip |
add a new test:match command script (#2470)
-rw-r--r-- | CONTRIBUTING.md | 7 | ||||
-rw-r--r-- | package.json | 1 | ||||
-rw-r--r-- | packages/astro/package.json | 3 |
3 files changed, 7 insertions, 4 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 66355404a..3a3cd5400 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -54,9 +54,10 @@ DEBUG=vite:[name] astro dev # debug specific process, e.g. "vite:deps" or "vit ```shell # run this in the top-level project root to run all tests yarn test -# run only a few tests, great for working on a single feature -# (example - `yarn test -g "RSS"` runs `astro-rss.test.js`) -yarn test -g "$STRING_MATCH" +# run only a few tests, based on describe() or it() string match +# great for development, and working on a single feature! +# (example - `yarn test:match "RSS"` runs tests in `astro-rss.test.js`) +yarn test:match "$STRING_MATCH" ``` ### Other useful commands diff --git a/package.json b/package.json index 13312a96b..fde15dec5 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,7 @@ "build:examples": "turbo run build --scope=docs --scope=\"@example/*\"", "dev": "turbo run dev --no-deps --no-cache --parallel --scope=astro --scope=create-astro --scope=\"@astrojs/*\"", "test": "turbo run test --scope=astro", + "test:match": "cd packages/astro && yarn run test:match", "test:templates": "turbo run test --scope=create-astro", "benchmark": "turbo run benchmark --scope=astro", "lint": "eslint \"packages/**/*.ts\"", diff --git a/packages/astro/package.json b/packages/astro/package.json index 07e88ddaf..d041616ae 100644 --- a/packages/astro/package.json +++ b/packages/astro/package.json @@ -51,7 +51,8 @@ "dev": "astro-scripts dev \"src/**/*.ts\"", "postbuild": "astro-scripts copy \"src/**/*.astro\"", "benchmark": "node test/benchmark/dev.bench.js && node test/benchmark/build.bench.js", - "test": "mocha --parallel --timeout 15000 --ignore **/lit-element.test.js && mocha **/lit-element.test.js" + "test": "mocha --parallel --timeout 15000 --ignore **/lit-element.test.js && mocha **/lit-element.test.js", + "test:match": "mocha --timeout 15000 -g" }, "dependencies": { "@astrojs/compiler": "^0.9.2", |