WordPress / WordPress/theme-check

Add Unit Tests

Open
#290 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
371
Forks
113
Avg merge
8m
Merged PRs (30d)
5

Description

It'd be great if there were unit tests available that had examples of all the bad code that these checks are trying to pick up.

Right now, its hard to know that if changing a check is going to cause some code to pass by, or in some cases, what it's even trying to detect.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue does not name any files, tests, or entry points. Start by reviewing the repository's existing test setup and the checks being tested, then add representative bad-code examples for the checks and verify that the tests distinguish detected code from code that should pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, wordpress
Domain
devtools, testing
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.