From 5c1faa901effe1bedb617cd588ef19c3bab35f6f Mon Sep 17 00:00:00 2001 From: Lauren Tan Date: Tue, 6 Jun 2023 10:56:20 -0400 Subject: [PATCH] Add workspace command to run all tests --- compiler/forget/package.json | 1 + .../forget/packages/babel-plugin-react-forget/package.json | 3 ++- compiler/forget/packages/eslint-browser/package.json | 3 ++- compiler/forget/packages/playground/package.json | 3 ++- compiler/forget/packages/react-forget-runtime/package.json | 3 ++- 5 files changed, 9 insertions(+), 4 deletions(-) diff --git a/compiler/forget/package.json b/compiler/forget/package.json index 5f592958fd..4ed0e901f8 100644 --- a/compiler/forget/package.json +++ b/compiler/forget/package.json @@ -13,6 +13,7 @@ "next": "yarn workspace playground run dev", "build": "yarn workspaces run build", "dev": "concurrently --kill-others \"yarn workspace babel-plugin-react-forget run tsc --watch\" \"yarn workspace playground run dev\"", + "test": "yarn workspaces run test", "snap": "yarn workspace babel-plugin-react-forget run snap", "snap:build": "yarn workspace snap run build" }, diff --git a/compiler/forget/packages/babel-plugin-react-forget/package.json b/compiler/forget/packages/babel-plugin-react-forget/package.json index 8ae61a458a..dba00aa428 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/package.json +++ b/compiler/forget/packages/babel-plugin-react-forget/package.json @@ -11,7 +11,8 @@ "build": "rimraf dist && tsc", "bundle:meta": "scripts/bundle-meta.sh", "hash": "scripts/hash-dist.sh", - "test": "tsc && jest", + "test": "yarn jest && yarn snap:build && yarn snap", + "jest": "tsc && jest", "snap": "node ../snap/dist/main.js", "snap:build": "yarn workspace snap run build", "ts:analyze-trace": "scripts/ts-analyze-trace.sh", diff --git a/compiler/forget/packages/eslint-browser/package.json b/compiler/forget/packages/eslint-browser/package.json index 2af37161e5..c37536a284 100644 --- a/compiler/forget/packages/eslint-browser/package.json +++ b/compiler/forget/packages/eslint-browser/package.json @@ -4,7 +4,8 @@ "private": true, "main": "dist/main.js", "scripts": { - "build": "webpack --mode=development" + "build": "webpack --mode=development", + "test": ":" }, "dependencies": { "eslint": "^8.25.0", diff --git a/compiler/forget/packages/playground/package.json b/compiler/forget/packages/playground/package.json index 953619c10a..9637aacf91 100644 --- a/compiler/forget/packages/playground/package.json +++ b/compiler/forget/packages/playground/package.json @@ -7,7 +7,8 @@ "build": "next build && node ./scripts/downloadFonts.js", "vercel-build": "yarn workspaces run build", "start": "next start", - "lint": "next lint" + "lint": "next lint", + "test": "yarn lint" }, "dependencies": { "@babel/core": "^7.19.1", diff --git a/compiler/forget/packages/react-forget-runtime/package.json b/compiler/forget/packages/react-forget-runtime/package.json index 7bbf786949..a0071d786b 100644 --- a/compiler/forget/packages/react-forget-runtime/package.json +++ b/compiler/forget/packages/react-forget-runtime/package.json @@ -8,6 +8,7 @@ "index.js" ], "scripts": { - "build": ":" + "build": ":", + "test": ":" } }