Skip to content

Latest commit

 

History

History
25 lines (20 loc) · 776 Bytes

readme.md

File metadata and controls

25 lines (20 loc) · 776 Bytes

#Fetch-Favicon Tests

##Adding a new test case

Upon finding a website that does not return the desired results:

  1. Copy the source of the website into a file in the ./test/unit/icon/ folder.

  2. Add a record to .test/unit/icon/test-cases.json:

    [
        {
            "fileName": "" //Name of the source file under test
            "response": "http://example.com/myicon.png" //The desired result image url
        }
    ]
  3. Run npm run test to see the test fail.

  4. Reduce the source of the website for simplicity, while not changing the nature of the failure. Usually you can:

    • Remove the entire <body>
    • Remove all <script> tags
    • Remove/obfuscate all of the text content.
  5. Fix the the test.

  6. Re-run tests.