Skip to content

Commit 639413f

Browse files
committed
feat: add snapshots for --bare flag
1 parent 42df7c5 commit 639413f

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
verification-script:
5252
- pnpm --filter "\!*typescript*" build
5353
- pnpm --filter "*typescript*" build
54-
- pnpm --filter "*vitest*" test:unit
54+
- pnpm --filter "*vitest*" --filter "\!*bare*" test:unit
5555
- pnpm --filter "*eslint*" lint --no-fix --max-warnings=0
5656
- pnpm --filter "*prettier*" format --write --check
5757
# FIXME: it's failing now

scripts/snapshot.mjs

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ if (!/pnpm/.test(process.env.npm_config_user_agent ?? ''))
88
throw new Error("Please use pnpm ('pnpm run snapshot') to generate snapshots!")
99

1010
const featureFlags = [
11+
'bare',
1112
'typescript',
1213
'jsx',
1314
'router',
@@ -54,11 +55,7 @@ function fullCombination(arr) {
5455
}
5556

5657
let flagCombinations = fullCombination(featureFlags)
57-
flagCombinations.push(
58-
['default'],
59-
['eslint'],
60-
['eslint-with-prettier'],
61-
)
58+
flagCombinations.push(['default'], ['bare', 'default'], ['eslint'], ['eslint-with-prettier'])
6259

6360
// `--with-tests` are equivalent of `--vitest --cypress`
6461
// Previously it means `--cypress` without `--vitest`.
@@ -84,10 +81,14 @@ for (const flags of flagCombinations) {
8481
}
8582

8683
// Filter out combinations that are not allowed
87-
flagCombinations = flagCombinations.filter(
88-
(combination) =>
89-
!featureFlagsDenylist.some((denylist) => denylist.every((flag) => combination.includes(flag))),
90-
)
84+
flagCombinations = flagCombinations
85+
.filter(
86+
(combination) =>
87+
!featureFlagsDenylist.some((denylist) =>
88+
denylist.every((flag) => combination.includes(flag)),
89+
),
90+
)
91+
.filter((combination) => !(combination.length === 1 && combination[0] === 'bare'))
9192

9293
const bin = path.posix.relative('../playground/', '../outfile.cjs')
9394

0 commit comments

Comments
 (0)