neo-scraper/docs/TESTING.md

524 B

Testing notes

Run all tests in testfiles matching some pattern

yarn test pixiv

Run one specific test ({{describe name}} {{it name}})

yarn test pixiv -t "get pixiv post 96268450 \(multipage, expanded\) should find exactly four posts"

For some reason you need to escape the parentheses.

Debug puppeteer tests

yarn test:debug # you can add more arguments if you want

This will disable headless mode. Use await jestPuppeteer.debug(); in the test code to pause code execution.