Skip to content

chore(tests): refactor assertions to use 'to.contain' instead of 'to.contains'#599

Merged
kopernic-pl merged 1 commit into
mainfrom
chore/proper-english-in-asserts-refactor
Oct 9, 2025
Merged

chore(tests): refactor assertions to use 'to.contain' instead of 'to.contains'#599
kopernic-pl merged 1 commit into
mainfrom
chore/proper-english-in-asserts-refactor

Conversation

@kopernic-pl
Copy link
Copy Markdown
Contributor

This pull request updates the test assertions across several command test suites to use the correct Chai assertion method. Specifically, it replaces .contains with .contain in all relevant expect statements, ensuring proper usage of the Chai library for string containment checks. No functional test logic or behavior is changed; these updates are solely to improve correctness and consistency in the test code.

Test assertion improvements:

  • Replaced .contains with .contain in all expect statements in api/create.test.js to properly check error and output messages for various api:create scenarios. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]
  • Updated .contains to .contain in api/delete.test.js for output validation when deleting API versions and definitions. [1] [2] [3] [4]
  • Updated .contains to .contain in api/get.test.js for output validation in both JSON and YAML response formats. [1] [2] [3] [4] [5] [6] [7] [8]
  • Updated .contains to .contain in api/publish.test.js, api/setdefault.test.js, and api/unpublish.test.js for publish, setdefault, and unpublish command output assertions. [1] [2] [3] [4]
  • Updated .contains to .contain in api/update.test.js for both error and success output assertions in various api:update scenarios. [1] [2] [3] [4] [5] [6] [7] [8]

@kopernic-pl kopernic-pl merged commit a7eeda4 into main Oct 9, 2025
2 checks passed
@kopernic-pl kopernic-pl deleted the chore/proper-english-in-asserts-refactor branch April 16, 2026 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants