Jest + Playwright Testing by jhildenbiddle · Pull Request #1276 · docsifyjs/docsify
added 15 commits
July 7, 2020 06:31- Setup projects for e2e, integration, and unit tests in Jest configuration - Setup /tests/e2e/ tests for Jest+PlayWright - Setup /tests/integration/ tests for Jest - Setup /tests/unit/ tests for Jest - Setup eslint for Jest and Jest+Playwright environments - Move e2e configuration files into separate folder - Update e2e example tests - Update unit example tests - Update HTML fixtures
- Add `debug` option - Append `Markdown` suffix to markdown-related options - Reorder options alphabetically
…2e only) - Create identical docsifyInit() tests using Jest (integration) and Playwright (e2e) - Update docsifyInit() to convert relative URLs to absolute URLs to work in both JSDOM and Playwright - Update docsifyInit() to append style- and js-related tags using createElement instead of insertAdjacentHTML - Update paths in test files to use unified docsifyInit() - Added option to docsifyInit() to enable/disable formatted HTML output to console - Removed vue.css as default docsify theme from docsifyInit() - Removed outdated files
- Allows mocking all XMLHttpRequests instead of just those initiated via /src/core/fetch/ajax.js - Allows JSDOM tests to use /lib/docsify.js instead of /src/core/index.js (same as Playwright tests) - Allows JSDOM tests to use /docs site as test content
- Import globals from various files instead of manually adding them to ensure they are availability in Jest and eslint configurations - Add middleware to server configuration for serving virtual “_blank.html” file - Add BLANK_URL - Rename TEST_URL to TEST_HOST - Removed ./test/fixtures/ directory (blank page now served via server.js middleware) - Added page.goto(BLANK_URL) call to global Playwright beforeEach() setup
- Relocate carbon plugin script with other scripts - Update zh-cn docs URL to align with other translatins (GitHub, not jsdelivr) - Add major version locks to URLs
# Conflicts: # cypress/fixtures/tpl/docs.index.html # docs/index.html # package-lock.json # test/unit/render.test.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters