Skip to content

Commit 79734a4

Browse files
jong-kyungfengmk2
andauthored
test(cli): verify .gitignore and .yarnrc.yml in new-vite-monorepo snap (#1576)
## Summary `ls | sort` skips dotfiles, so the `new-vite-monorepo` snap test never noticed if: - `_gitignore → .gitignore` rename failed - pnpm-branch `.yarnrc.yml` cleanup broke — the bun snap covers the npm/bun branch but not pnpm Adds two `test -f` / `test ! -f` assertions Co-authored-by: MK (fengmk2) <fengmk2@gmail.com>
1 parent 124f626 commit 79734a4

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

packages/cli/snap-tests-global/new-vite-monorepo/snap.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,12 @@ peerDependencyRules:
6868
vite: "*"
6969
vitest: "*"
7070

71+
> test -f vite-plus-monorepo/.gitignore && echo '.gitignore exists' || echo 'ERROR: .gitignore missing' # verify gitignore renamed from _gitignore
72+
.gitignore exists
73+
74+
> test ! -f vite-plus-monorepo/.yarnrc.yml && echo 'No .yarnrc.yml' || echo 'ERROR: .yarnrc.yml exists' # verify no yarn config for pnpm
75+
No .yarnrc.yml
76+
7177
> test -d vite-plus-monorepo/.git && echo 'Git initialized' || echo 'No git' # check git init
7278
Git initialized
7379

packages/cli/snap-tests-global/new-vite-monorepo/steps.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
"cat vite-plus-monorepo/package.json # check package.json",
1010
"cat vite-plus-monorepo/vite.config.ts # check vite config has cache enabled",
1111
"cat vite-plus-monorepo/pnpm-workspace.yaml # check workspace config",
12+
"test -f vite-plus-monorepo/.gitignore && echo '.gitignore exists' || echo 'ERROR: .gitignore missing' # verify gitignore renamed from _gitignore",
13+
"test ! -f vite-plus-monorepo/.yarnrc.yml && echo 'No .yarnrc.yml' || echo 'ERROR: .yarnrc.yml exists' # verify no yarn config for pnpm",
1214
"test -d vite-plus-monorepo/.git && echo 'Git initialized' || echo 'No git' # check git init",
1315
"ls vite-plus-monorepo/apps # check apps directory created",
1416
"ls vite-plus-monorepo/apps/website/package.json # check website package.json",

0 commit comments

Comments
 (0)