Fix no-op test assertions and drop redundant eslint overrides#146
Merged
Conversation
- 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 propertyaccess asserts nothing — and were masked by the test-file eslint overrides.
expect(x).true;/.false;) to real Vitest matchers (toBe(true)/toBe(false))across the server spec suite
*.speceslint overrides: the updated@eclipse-glsp/eslint-configenables coreno-unused-expressions(which now catches such no-op assertions even in tests) and namespace
checks pass cleanly, so both overrides are redundant
Also:
pnpm-lock.yamlfor the bumped@eclipse-glsp/eslint-configHow to test
Follow-ups
Changelog