mirror of
https://github.com/docsifyjs/docsify.git
synced 2025-12-08 19:55:52 +00:00
BREAKING: The new project layout might break in some tooling setups. We've added an exports field to `package.json` to specify where statements like `import ... from 'docsify'` will import from, and left the `main` and `unpkg` fields as-is for backwards compatibility with the global <script> import method. Most people who use a non-module `<script>` tag to import Docsify will not notice a difference. Anyone else who is importing Docsify into a specilized build setup using `import` statements has a chance of being broken, so we've marked this as BREAKING.
18 lines
569 B
JavaScript
18 lines
569 B
JavaScript
import { test as _test, expect as _expect } from '@playwright/test';
|
|
|
|
export const test = _test.extend({
|
|
page: async ({ page }, use) => {
|
|
global.page = page;
|
|
|
|
// Navigate to a real URL by default
|
|
// Playwright tests are executed on "about:blank" by default, which will
|
|
// cause operations that require the window location to be a valid URL to
|
|
// fail (e.g. AJAX requests). Navigating to a blank document with a real
|
|
// URL solved this problem.
|
|
await page.goto('/_blank.html');
|
|
await use(page);
|
|
},
|
|
});
|
|
|
|
export const expect = _expect;
|