arya2004/cmt-autofill

Set Up a Testing Framework

Open

#13 opened on Oct 2, 2025

 (1 comment) (0 reactions) (1 assignee)JavaScript (11 forks)auto 404
documentationgood first issuehacktoberfesthacktoberfest-acceptedhtmljavascript

Repository metrics

Stars
 (6 stars)
PR merge metrics
 (PR metrics pending)

Description

There are no automated tests. Add Jest for unit testing JavaScript files.

How to do it:

  1. Install Jest:

    npm install --save-dev jest
    
  2. Add a test script to package.json:

    "scripts": {
      "test": "jest"
    }
    
  3. Create a simple test in extension/popup.test.js (you will need to mock DOM and chrome APIs with Jest's jsdom and manual mocks).

Contributor guide