arya2004/cmt-autofill

Set Up a Testing Framework

Aperta

#13 aperta il 2 ott 2025

 (1 commento) (0 reazioni) (1 assegnatario)JavaScript (11 fork)auto 404
documentationgood first issuehacktoberfesthacktoberfest-acceptedhtmljavascript

Metriche repository

Star
 (6 stelle)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

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).

Guida contributor