Skip to content

Fix no-op test assertions and drop redundant eslint overrides#146

Merged
tortmayr merged 1 commit into
mainfrom
fix-assert
Jun 24, 2026
Merged

Fix no-op test assertions and drop redundant eslint overrides#146
tortmayr merged 1 commit into
mainfrom
fix-assert

Conversation

@tortmayr

Copy link
Copy Markdown
Contributor

What it does

After the Vitest migration, a number of tests still used chai-style
assertions like expect(x).true;. These are silent no-ops — the property
access asserts nothing — and were masked by the test-file eslint overrides.

  • Convert leftover chai-style assertions (expect(x).true; /
    .false;) to real Vitest matchers (toBe(true) / toBe(false))
    across the server spec suite
  • Remove the *.spec eslint overrides: the updated
    @eclipse-glsp/eslint-config enables core no-unused-expressions
    (which now catches such no-op assertions even in tests) and namespace
    checks pass cleanly, so both overrides are redundant

Also:

  • Refresh pnpm-lock.yaml for the bumped @eclipse-glsp/eslint-config

How to test

Follow-ups

Changelog

  • This PR should be mentioned in the changelog
  • This PR introduces a breaking change (if yes, provide more details below for the changelog and the migration guide)

- Convert leftover chai-style assertions (e.g. `expect(x).true;`) to
  real Vitest matchers (`toBe(true)`); after the Vitest migration these
  were silent no-ops that asserted nothing
- Remove the `*.spec` eslint overrides: the updated eslint-config
  enables core `no-unused-expressions` (which now catches such no-op
  assertions even in tests) and namespace checks pass cleanly, so both
  overrides are redundant

Also:
- Refresh pnpm-lock.yaml for the bumped @eclipse-glsp/eslint-config
@tortmayr tortmayr merged commit b7aa363 into main Jun 24, 2026
6 checks passed
@tortmayr tortmayr deleted the fix-assert branch June 24, 2026 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant