From 31c8163ca960141da424cd3ceebea4fc6815e187 Mon Sep 17 00:00:00 2001 From: YunYouJun Date: Sun, 26 Jun 2022 07:42:53 +0800 Subject: [PATCH] test: add recipe mode & component render --- .github/workflows/ci.yml | 22 + index.html | 2 +- package.json | 30 +- pnpm-lock.yaml | 1077 +++++++++++++++----------- src/auto-imports.d.ts | 2 + src/components.d.ts | 2 +- src/components/ChooseFood.vue | 40 +- src/components/tags/DishTag.vue | 2 +- src/components/tags/MeatTag.vue | 2 +- src/components/tags/VegetableTag.vue | 2 +- src/stores/recipe.ts | 1 + test/component.test.ts | 55 ++ test/recipe.test.ts | 97 +++ tsconfig.json | 1 + vite.config.ts | 9 + 15 files changed, 866 insertions(+), 478 deletions(-) create mode 100644 test/component.test.ts create mode 100644 test/recipe.test.ts diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7977d21..7212a21 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -47,3 +47,25 @@ jobs: - name: Typecheck run: pnpm run typecheck + + test: + runs-on: ${{ matrix.os }} + + strategy: + matrix: + node-version: [16.x] + os: [ubuntu-latest] + fail-fast: false + + steps: + - uses: actions/checkout@v3 + - uses: pnpm/action-setup@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + registry-url: https://registry.npmjs.org/ + cache: pnpm + + - run: pnpm install + - run: pnpm run test diff --git a/index.html b/index.html index dba0e0e..e3b80d6 100644 --- a/index.html +++ b/index.html @@ -10,7 +10,7 @@ 隔离食用手册