John Hildenbiddle 4e5dae7d41 Squashed commit of the following:
commit a2ebb2192ac73211a8924111d736df9574abf61b
Author: 沈唁 <52o@qq52o.cn>
Date:   Sun Nov 8 16:48:43 2020 +0800

    fix: search titles containing ignored characters (#1395)

    * fix: search titles containing ignored characters

    * fix

    * add default value

    * add test

    * fix test

    Co-authored-by: Koy <koy@ko8e24.top>

commit 58fbca00ebd12f636c213d386761df9ebfb2bd4c
Author: Snyk bot <snyk-bot@snyk.io>
Date:   Thu Nov 5 03:04:19 2020 +0200

    fix: packages/docsify-server-renderer/package.json & packages/docsify-server-renderer/package-lock.json to reduce vulnerabilities (#1418)

    The following vulnerabilities are fixed with an upgrade:
    - https://snyk.io/vuln/SNYK-JS-DOMPURIFY-1035544
2020-11-10 18:38:00 -06:00
..
2020-11-06 19:24:23 -06:00
2020-11-10 18:38:00 -06:00
2020-10-26 02:08:51 -05:00
2020-10-26 02:23:57 -05:00
2020-10-26 02:18:01 -05:00
2020-10-05 14:10:30 -05:00
2020-10-25 23:05:16 -05:00

Docsify Testing

Environment

  • Jest: A test framework used for assertions, mocks, spies, etc.
  • Playwright: A test automation tool for launching browsers and manipulating the DOM.
  • Jest-Playwright: A Jest preset that simplifies using Jest and Playwright together

Test files

  • E2E tests are located in /test/e2e/ and use Jest + Playwright.
  • Integration tests are located in /test/integration/ and use Jest.
  • Unit tests located in /test/unit/ and use Jest.

Global Variables

  • BLANK_URL: Test server route to virtual _blank.html file
  • TEST_HOST: Test server ip:port

CLI commands

# Run all tests
npm run test

# Run test types
npm run test:e2e
npm run test:integration
npm run test:unit

# Run test file
npm run test -- -i /path/to/file.test.js

# Run matching test files
npm run test -- -i /path/to/*.test.js

# Run matching test name(s)
npm run test -- -t \"describe() or test() name\"

# Run matching test name(s) in file
npm run test -- -i /path/to/file.test.js -t \"describe() or test() name\"

# Run all example tests
npm run test -- -i /test/**/example.test.js

# Run specific example test file
npm run test -- -i /path/to/example.test.js

# ------------------------------------------------------------------------------

# Update snapshots for matching test files
npm run test -- -u -i /path/to/*.test.js

# Update snapshots for matching test name(s)
npm run test -- -u -t \"describe() or test() name\"

# Update snapshots for matching test name(s) in file
npm run test -- -u -i /path/to/file.test.js -t \"describe() or test() name\"

# ------------------------------------------------------------------------------

# Start manual test server instance. Useful for previewing test fixtures.
# Root: /test/e2e/fixtures/
# Routes: /docs, /lib,
node ./test/config/server.js --start

Resource