dev: add test-dev command for easier testing of packages (#2627)

@si14 you might know a better way to wire this up! lemme know if there's
something more clever here.

### Change Type

- [x] `internal` — Any other changes that don't affect the published
package[^2]

### Release Notes

- Adds easier testing command for individual packages.
This commit is contained in:
Mime Čuvalo 2024-01-29 10:29:38 +00:00 committed by GitHub
parent d82344bf15
commit 23f60ee98e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 13 additions and 1 deletions

View file

@ -11,6 +11,7 @@
"scripts": { "scripts": {
"dev": "cross-env NODE_ENV=development wrangler dev --log-level info --persist-to tmp-assets", "dev": "cross-env NODE_ENV=development wrangler dev --log-level info --persist-to tmp-assets",
"test": "lazy inherit --passWithNoTests", "test": "lazy inherit --passWithNoTests",
"test-dev": "yarn run -T jest --watch",
"test-coverage": "lazy inherit --passWithNoTests", "test-coverage": "lazy inherit --passWithNoTests",
"lint": "yarn run -T tsx ../../scripts/lint.ts" "lint": "yarn run -T tsx ../../scripts/lint.ts"
}, },

View file

@ -16,6 +16,7 @@
"dev-wrangler": "yarn run -T tsx ./scripts/dev-wrap.ts", "dev-wrangler": "yarn run -T tsx ./scripts/dev-wrap.ts",
"report-size": "node scripts/report-size.js", "report-size": "node scripts/report-size.js",
"test": "lazy inherit", "test": "lazy inherit",
"test-dev": "yarn run -T jest --watch",
"test-coverage": "lazy inherit", "test-coverage": "lazy inherit",
"lint": "yarn run -T tsx ../../scripts/lint.ts" "lint": "yarn run -T tsx ../../scripts/lint.ts"
}, },

View file

@ -15,7 +15,8 @@
"build": "yarn run -T tsx scripts/build.ts", "build": "yarn run -T tsx scripts/build.ts",
"start": "VITE_PREVIEW=1 yarn run -T tsx scripts/dev-app.ts", "start": "VITE_PREVIEW=1 yarn run -T tsx scripts/dev-app.ts",
"lint": "yarn run -T tsx ../../scripts/lint.ts", "lint": "yarn run -T tsx ../../scripts/lint.ts",
"test": "lazy inherit" "test": "lazy inherit",
"test-dev": "yarn run -T jest --watch"
}, },
"dependencies": { "dependencies": {
"@radix-ui/react-popover": "^1.0.7", "@radix-ui/react-popover": "^1.0.7",

View file

@ -55,6 +55,7 @@
"check-scripts": "tsx scripts/check-scripts.ts", "check-scripts": "tsx scripts/check-scripts.ts",
"api-check": "lazy api-check", "api-check": "lazy api-check",
"test": "lazy test", "test": "lazy test",
"test-dev": "yarn run -T jest --watch",
"test-coverage": "lazy test-coverage && node scripts/offer-coverage.mjs", "test-coverage": "lazy test-coverage && node scripts/offer-coverage.mjs",
"e2e": "lazy e2e --filter='apps/examples'" "e2e": "lazy e2e --filter='apps/examples'"
}, },

View file

@ -34,6 +34,7 @@
], ],
"scripts": { "scripts": {
"test": "lazy inherit", "test": "lazy inherit",
"test-dev": "yarn run -T jest --watch",
"benchmark": "yarn run -T tsx ./scripts/benchmark.ts", "benchmark": "yarn run -T tsx ./scripts/benchmark.ts",
"test-coverage": "lazy inherit", "test-coverage": "lazy inherit",
"build": "yarn run -T tsx ../../scripts/build-package.ts", "build": "yarn run -T tsx ../../scripts/build-package.ts",

View file

@ -31,6 +31,7 @@
"files": [], "files": [],
"scripts": { "scripts": {
"test": "lazy inherit", "test": "lazy inherit",
"test-dev": "yarn run -T jest --watch",
"test-coverage": "lazy inherit", "test-coverage": "lazy inherit",
"build": "yarn run -T tsx ../../scripts/build-package.ts", "build": "yarn run -T tsx ../../scripts/build-package.ts",
"build-api": "yarn run -T tsx ../../scripts/build-api.ts", "build-api": "yarn run -T tsx ../../scripts/build-api.ts",

View file

@ -31,6 +31,7 @@
"files": [], "files": [],
"scripts": { "scripts": {
"test": "lazy inherit", "test": "lazy inherit",
"test-dev": "yarn run -T jest --watch",
"test-coverage": "lazy inherit", "test-coverage": "lazy inherit",
"build": "yarn run -T tsx ../../scripts/build-package.ts", "build": "yarn run -T tsx ../../scripts/build-package.ts",
"build-api": "yarn run -T tsx ../../scripts/build-api.ts", "build-api": "yarn run -T tsx ../../scripts/build-api.ts",

View file

@ -29,6 +29,7 @@
"types": "./.tsbuild/index.d.ts", "types": "./.tsbuild/index.d.ts",
"scripts": { "scripts": {
"test": "lazy inherit", "test": "lazy inherit",
"test-dev": "yarn run -T jest --watch",
"test-coverage": "lazy inherit", "test-coverage": "lazy inherit",
"predev": "node ./scripts/copy-css-files.mjs", "predev": "node ./scripts/copy-css-files.mjs",
"dev": "chokidar '../{editor/editor,tldraw/src/lib/ui}.css' -c 'node ./scripts/copy-css-files.mjs'", "dev": "chokidar '../{editor/editor,tldraw/src/lib/ui}.css' -c 'node ./scripts/copy-css-files.mjs'",

View file

@ -31,6 +31,7 @@
"files": [], "files": [],
"scripts": { "scripts": {
"test": "lazy inherit", "test": "lazy inherit",
"test-dev": "yarn run -T jest --watch",
"test-coverage": "lazy inherit", "test-coverage": "lazy inherit",
"index": "node ./scripts/build-index.js && yarn format", "index": "node ./scripts/build-index.js && yarn format",
"format": "yarn run -T prettier --write --cache \"src/**/*.{ts,tsx,js,jsx,json,md}\"", "format": "yarn run -T prettier --write --cache \"src/**/*.{ts,tsx,js,jsx,json,md}\"",

View file

@ -32,6 +32,7 @@
"files": [], "files": [],
"scripts": { "scripts": {
"test": "lazy inherit", "test": "lazy inherit",
"test-dev": "yarn run -T jest --watch",
"test-coverage": "lazy inherit", "test-coverage": "lazy inherit",
"lint": "yarn run -T tsx ../../scripts/lint.ts" "lint": "yarn run -T tsx ../../scripts/lint.ts"
}, },

View file

@ -31,6 +31,7 @@
"files": [], "files": [],
"scripts": { "scripts": {
"test": "lazy inherit", "test": "lazy inherit",
"test-dev": "yarn run -T jest --watch",
"test-coverage": "lazy inherit", "test-coverage": "lazy inherit",
"build": "yarn run -T tsx ../../scripts/build-package.ts", "build": "yarn run -T tsx ../../scripts/build-package.ts",
"build-api": "yarn run -T tsx ../../scripts/build-api.ts", "build-api": "yarn run -T tsx ../../scripts/build-api.ts",

View file

@ -31,6 +31,7 @@
"files": [], "files": [],
"scripts": { "scripts": {
"test": "lazy inherit", "test": "lazy inherit",
"test-dev": "yarn run -T jest --watch",
"test-coverage": "lazy inherit", "test-coverage": "lazy inherit",
"build": "yarn run -T tsx ../../scripts/build-package.ts", "build": "yarn run -T tsx ../../scripts/build-package.ts",
"build-api": "yarn run -T tsx ../../scripts/build-api.ts", "build-api": "yarn run -T tsx ../../scripts/build-api.ts",