Skip to content

Commit ddb38dc

Browse files
committed
fix: use test -f in command-init-inline-config snap test
1 parent e9b86fc commit ddb38dc

2 files changed

Lines changed: 4 additions & 7 deletions

File tree

packages/cli/snap-tests/command-init-inline-config/snap.txt

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@ export default defineConfig({
88
lint: { options: { typeAware: true, typeCheck: true } },
99
});
1010

11-
> cat .oxlintrc.json && exit 1 || true # check .oxlintrc.json is removed
12-
cat: .oxlintrc.json: No such file or directory
13-
11+
> test ! -f .oxlintrc.json # check .oxlintrc.json is removed
1412
> rm vite.config.ts
1513
> vp fmt --init
1614
Added 'fmt' to 'vite.config.ts'.
@@ -24,5 +22,4 @@ export default defineConfig({
2422
},
2523
});
2624

27-
> cat .oxfmtrc.json && exit 1 || true # check .oxfmtrc.json is removed
28-
cat: .oxfmtrc.json: No such file or directory
25+
> test ! -f .oxfmtrc.json # check .oxfmtrc.json is removed

packages/cli/snap-tests/command-init-inline-config/steps.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
"commands": [
66
"vp lint --init",
77
"cat vite.config.ts",
8-
"cat .oxlintrc.json && exit 1 || true # check .oxlintrc.json is removed",
8+
"test ! -f .oxlintrc.json # check .oxlintrc.json is removed",
99
"rm vite.config.ts",
1010
"vp fmt --init",
1111
"cat vite.config.ts",
12-
"cat .oxfmtrc.json && exit 1 || true # check .oxfmtrc.json is removed"
12+
"test ! -f .oxfmtrc.json # check .oxfmtrc.json is removed"
1313
]
1414
}

0 commit comments

Comments
 (0)