Skip to content

Commit

Permalink
test(ssr): remove env var, test coverage (#5139)
Browse files Browse the repository at this point in the history
* test(ssr): remove SSR tests env var

* test: add code coverage
  • Loading branch information
nolanlawson authored Jan 24, 2025
1 parent e4627e1 commit 9c1eb60
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 13 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,6 @@ jobs:
run: yarn test:types
- name: Run unit tests
run: yarn test:ci
# TODO [#4815]: enable all SSR v2 tests
- name: Run experimental SSR fixture tests
run: TEST_SSR_COMPILER=1 yarn test packages/@lwc/ssr-compiler/src/__tests__/fixtures.spec.ts
- name: Upload unit test coverage report
uses: actions/upload-artifact@v4
with:
Expand Down
4 changes: 1 addition & 3 deletions packages/@lwc/ssr-compiler/src/__tests__/fixtures.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,7 @@ async function compileFixture({ input, dirname }: { input: string; dirname: stri
return outputFile;
}

// We will enable this for realsies once all the tests are passing, but for now having the env var avoids
// running these tests in CI while still allowing for local testing.
describe.runIf(process.env.TEST_SSR_COMPILER).concurrent('fixtures', () => {
describe.concurrent('fixtures', () => {
testFixtureDir(
{
root: path.resolve(__dirname, '../../../engine-server/src/__tests__/fixtures'),
Expand Down
21 changes: 14 additions & 7 deletions vitest.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,24 @@ export default defineConfig({
'**/packages/@lwc/perf-benchmarks-components/**',
'**/packages/@lwc/perf-benchmarks/**',
'**/playground/**',
// These are not production-ready yet
'**/packages/@lwc/ssr-compiler/**',
'**/packages/@lwc/ssr-runtime/**',
// This just re-exports other packages
'**/packages/lwc/**',
],
thresholds: {
branches: 95,
functions: 95,
lines: 95,
statements: 95,
// SSR compiler/runtime is relatively newer, so has lower thresholds for now
'**/packages/@lwc/ssr-*/**': {
branches: 90,
functions: 60,
lines: 85,
statements: 85,
},

'!**/packages/@lwc/ssr-*/**': {
branches: 95,
functions: 95,
lines: 95,
statements: 95,
},
},
reporter: [
'clover',
Expand Down

0 comments on commit 9c1eb60

Please sign in to comment.