Skip to content

Conversation

@Bappoz
Copy link

@Bappoz Bappoz commented Oct 31, 2025

This PR adds a unit test suite covering the static method isSystemPath(path) from the BaseItem class, based on the MC/DC (Modified Condition/Decision Coverage) criterion. The tests ensure that each individual condition independently affects the outcome of the decision logic.
Test cases included

  • CT1: All conditions true → expected return: true
  • CT2: path is empty → expected return: false
  • CT3: path has no dot → expected return: false
  • CT4: name.length < 32 → expected return: false
  • CT5: ext !== 'md' → expected return: false
@github-actions
Copy link
Contributor

CLA Assistant Lite bot:
Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request

@personalizedrefrigerator personalizedrefrigerator changed the title test: Add test for querying items with special character IDs Oct 31, 2025
});
});

describe("isSystemPath - MC/DC", () => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the pull request!

Feedback:

  • Be sure that code passes the linter.
  • Be sure that the code passes the typechecker prior to committing.
  • Usually, the .test.ts files should have a single describe block per file.
  • Test names should use English and usually should be in the form it('should ...'.
  • Consider using the test.each pattern when there are many similar tests with different inputs/outputs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants