feat: return promise or cached data if already preloading/preloaded #37
Annotations
5 errors and 1 warning
Run tests
Error: item focused with '.only' is not allowed due to the 'forbidOnly' option in '../config/playwright.config.ts': "preload-plugin.spec.ts instance methods returns the preload promise if currently preloading"
at preload-plugin.spec.ts:46
44 | expect(typeof result.html).toBe('string');
45 | });
> 46 | test.only('returns the preload promise if currently preloading', async ({ page }) => {
| ^
47 | const result = await page.evaluate(async () => {
48 | window._swup.preload!('/page-2.html');
49 | const second = await window._swup.preload!('/page-2.html');
|
Run tests
Error: item focused with '.only' is not allowed due to the 'forbidOnly' option in '../config/playwright.config.ts': "preload-plugin.spec.ts instance methods returns the preload promise if currently preloading"
at preload-plugin.spec.ts:46
44 | expect(typeof result.html).toBe('string');
45 | });
> 46 | test.only('returns the preload promise if currently preloading', async ({ page }) => {
| ^
47 | const result = await page.evaluate(async () => {
48 | window._swup.preload!('/page-2.html');
49 | const second = await window._swup.preload!('/page-2.html');
|
Run tests
Error: item focused with '.only' is not allowed due to the 'forbidOnly' option in '../config/playwright.config.ts': "preload-plugin.spec.ts instance methods returns the preload promise if currently preloading"
at preload-plugin.spec.ts:46
44 | expect(typeof result.html).toBe('string');
45 | });
> 46 | test.only('returns the preload promise if currently preloading', async ({ page }) => {
| ^
47 | const result = await page.evaluate(async () => {
48 | window._swup.preload!('/page-2.html');
49 | const second = await window._swup.preload!('/page-2.html');
|
Run tests
Error: item focused with '.only' is not allowed due to the 'forbidOnly' option in '../config/playwright.config.ts': "preload-plugin.spec.ts instance methods returns the preload promise if currently preloading"
at preload-plugin.spec.ts:46
44 | expect(typeof result.html).toBe('string');
45 | });
> 46 | test.only('returns the preload promise if currently preloading', async ({ page }) => {
| ^
47 | const result = await page.evaluate(async () => {
48 | window._swup.preload!('/page-2.html');
49 | const second = await window._swup.preload!('/page-2.html');
|
Run tests
Process completed with exit code 1.
|
The following actions use a deprecated Node.js version and will be forced to run on node20: actions/checkout@v3, actions/setup-node@v3. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
|
Loading