dev: swap yarn test and test-dev for better dx (#2773)

As discussed offline, just making `yarn test` do what we expect it to.

### Change Type

- [x] `internal` — Any other changes that don't affect the published
package[^2]
pull/2784/merge
Mime Čuvalo 2024-02-14 16:05:59 +00:00 zatwierdzone przez GitHub
rodzic 7caaa2fbbb
commit 2ad47958bb
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
16 zmienionych plików z 29 dodań i 29 usunięć

Wyświetl plik

@ -51,7 +51,7 @@ jobs:
run: yarn api-check
- name: Test
run: yarn test
run: yarn test-ci
build:
name: 'Build all projects'

Wyświetl plik

@ -16,7 +16,7 @@ To create a pull request:
2. [Create a separate branch](https://docs.github.com/en/desktop/contributing-and-collaborating-using-github-desktop/managing-branches) for your changes
3. Make your changes, and ensure that it is formatted by [Prettier](https://prettier.io) and type-checks without errors in [TypeScript](https://www.typescriptlang.org/)
4. Write tests that validate your change and/or fix.
5. Run `yarn build` and then run tests with `yarn test`.
5. Run `yarn build` and then run tests with `yarn test-ci`.
6. Push your branch and open a PR. 🚀
Before your code is merged, you will need to sign our [contributor license agreement](https://github.com/tldraw/tldraw/blob/main/CLA.md), which is handled automatically via GitHub comments. Your PR will be reviewed and merged in within a day or two if everything looks good.

Wyświetl plik

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

Wyświetl plik

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

Wyświetl plik

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

Wyświetl plik

@ -53,7 +53,7 @@ const config = {
'apps/vscode/*': { runsAfter: { build: { in: 'self-only' } } },
},
},
test: {
'test-ci': {
baseCommand: 'yarn run -T jest',
runsAfter: { 'refresh-assets': {} },
cache: {

Wyświetl plik

@ -54,8 +54,8 @@
"typecheck": "yarn refresh-assets && tsx scripts/typecheck.ts",
"check-scripts": "tsx scripts/check-scripts.ts",
"api-check": "lazy api-check",
"test": "lazy test",
"test-dev": "yarn run -T jest --watch",
"test-ci": "lazy test-ci",
"test": "yarn run -T jest",
"test-coverage": "lazy test-coverage && node scripts/offer-coverage.mjs",
"e2e": "lazy e2e --filter='apps/examples'"
},

Wyświetl plik

@ -33,8 +33,8 @@
"editor.css"
],
"scripts": {
"test": "lazy inherit",
"test-dev": "yarn run -T jest --watch",
"test-ci": "lazy inherit",
"test": "yarn run -T jest",
"benchmark": "yarn run -T tsx ./scripts/benchmark.ts",
"test-coverage": "lazy inherit",
"build": "yarn run -T tsx ../../scripts/build-package.ts",

Wyświetl plik

@ -30,8 +30,8 @@
"/* GOTCHA */": "files will include ./dist and index.d.ts by default, add any others you want to include in here",
"files": [],
"scripts": {
"test": "lazy inherit",
"test-dev": "yarn run -T jest --watch",
"test-ci": "lazy inherit",
"test": "yarn run -T jest",
"test-coverage": "lazy inherit",
"build": "yarn run -T tsx ../../scripts/build-package.ts",
"build-api": "yarn run -T tsx ../../scripts/build-api.ts",

Wyświetl plik

@ -30,8 +30,8 @@
"/* GOTCHA */": "files will include ./dist and index.d.ts by default, add any others you want to include in here",
"files": [],
"scripts": {
"test": "lazy inherit",
"test-dev": "yarn run -T jest --watch",
"test-ci": "lazy inherit",
"test": "yarn run -T jest",
"test-coverage": "lazy inherit",
"build": "yarn run -T tsx ../../scripts/build-package.ts",
"build-api": "yarn run -T tsx ../../scripts/build-api.ts",

Wyświetl plik

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

Wyświetl plik

@ -30,8 +30,8 @@
"/* GOTCHA */": "files will include ./dist and index.d.ts by default, add any others you want to include in here",
"files": [],
"scripts": {
"test": "lazy inherit",
"test-dev": "yarn run -T jest --watch",
"test-ci": "lazy inherit",
"test": "yarn run -T jest",
"test-coverage": "lazy inherit",
"index": "node ./scripts/build-index.js && yarn format",
"format": "yarn run -T prettier --write --cache \"src/**/*.{ts,tsx,js,jsx,json,md}\"",

Wyświetl plik

@ -31,8 +31,8 @@
"/* GOTCHA */": "files will include ./dist and index.d.ts by default, add any others you want to include in here",
"files": [],
"scripts": {
"test": "lazy inherit",
"test-dev": "yarn run -T jest --watch",
"test-ci": "lazy inherit",
"test": "yarn run -T jest",
"test-coverage": "lazy inherit",
"lint": "yarn run -T tsx ../../scripts/lint.ts"
},

Wyświetl plik

@ -30,8 +30,8 @@
"/* GOTCHA */": "files will include ./dist and index.d.ts by default, add any others you want to include in here",
"files": [],
"scripts": {
"test": "lazy inherit",
"test-dev": "yarn run -T jest --watch",
"test-ci": "lazy inherit",
"test": "yarn run -T jest",
"test-coverage": "lazy inherit",
"build": "yarn run -T tsx ../../scripts/build-package.ts",
"build-api": "yarn run -T tsx ../../scripts/build-api.ts",

Wyświetl plik

@ -30,8 +30,8 @@
"/* GOTCHA */": "files will include ./dist and index.d.ts by default, add any others you want to include in here",
"files": [],
"scripts": {
"test": "lazy inherit",
"test-dev": "yarn run -T jest --watch",
"test-ci": "lazy inherit",
"test": "yarn run -T jest",
"test-coverage": "lazy inherit",
"build": "yarn run -T tsx ../../scripts/build-package.ts",
"build-api": "yarn run -T tsx ../../scripts/build-api.ts",

Wyświetl plik

@ -20,7 +20,7 @@ const expectedScripts = {
// packages (in packages/) should have these scripts
const expectedPackageScripts = {
...expectedScripts,
test: () => 'lazy inherit',
'test-ci': () => 'lazy inherit',
}
// published packages should have these scripts
@ -45,7 +45,7 @@ const perPackageExceptions: Record<string, Record<string, () => string | undefin
lint: () => 'lazy lint',
},
'@tldraw/assets': {
test: () => undefined,
'test-ci': () => undefined,
build: () => undefined,
'build-api': () => undefined,
prepack: () => undefined,