Skip to content

Commit 9c1eb60

Browse files
authored
test(ssr): remove env var, test coverage (#5139)
* test(ssr): remove SSR tests env var * test: add code coverage
1 parent e4627e1 commit 9c1eb60

File tree

3 files changed

+15
-13
lines changed

3 files changed

+15
-13
lines changed

.github/workflows/unit.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,6 @@ jobs:
6666
run: yarn test:types
6767
- name: Run unit tests
6868
run: yarn test:ci
69-
# TODO [#4815]: enable all SSR v2 tests
70-
- name: Run experimental SSR fixture tests
71-
run: TEST_SSR_COMPILER=1 yarn test packages/@lwc/ssr-compiler/src/__tests__/fixtures.spec.ts
7269
- name: Upload unit test coverage report
7370
uses: actions/upload-artifact@v4
7471
with:

packages/@lwc/ssr-compiler/src/__tests__/fixtures.spec.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,7 @@ async function compileFixture({ input, dirname }: { input: string; dirname: stri
7777
return outputFile;
7878
}
7979

80-
// We will enable this for realsies once all the tests are passing, but for now having the env var avoids
81-
// running these tests in CI while still allowing for local testing.
82-
describe.runIf(process.env.TEST_SSR_COMPILER).concurrent('fixtures', () => {
80+
describe.concurrent('fixtures', () => {
8381
testFixtureDir(
8482
{
8583
root: path.resolve(__dirname, '../../../engine-server/src/__tests__/fixtures'),

vitest.config.mjs

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,24 @@ export default defineConfig({
2929
'**/packages/@lwc/perf-benchmarks-components/**',
3030
'**/packages/@lwc/perf-benchmarks/**',
3131
'**/playground/**',
32-
// These are not production-ready yet
33-
'**/packages/@lwc/ssr-compiler/**',
34-
'**/packages/@lwc/ssr-runtime/**',
3532
// This just re-exports other packages
3633
'**/packages/lwc/**',
3734
],
3835
thresholds: {
39-
branches: 95,
40-
functions: 95,
41-
lines: 95,
42-
statements: 95,
36+
// SSR compiler/runtime is relatively newer, so has lower thresholds for now
37+
'**/packages/@lwc/ssr-*/**': {
38+
branches: 90,
39+
functions: 60,
40+
lines: 85,
41+
statements: 85,
42+
},
43+
44+
'!**/packages/@lwc/ssr-*/**': {
45+
branches: 95,
46+
functions: 95,
47+
lines: 95,
48+
statements: 95,
49+
},
4350
},
4451
reporter: [
4552
'clover',

0 commit comments

Comments
 (0)