Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REGRESSION]: No tests found #22730

Closed
MrVauxs opened this issue Apr 30, 2023 · 4 comments
Closed

[REGRESSION]: No tests found #22730

MrVauxs opened this issue Apr 30, 2023 · 4 comments

Comments

@MrVauxs
Copy link

MrVauxs commented Apr 30, 2023

Context:

  • GOOD Playwright Version: 1.32.3
  • BAD Playwright Version: 1.33.0
  • Operating System: Linux Ubuntu
  • Extra: Stopped working both on a remote work server as well as in Github Actions (ubuntu-latest)

Code Snippet

import { expect, test } from '@playwright/test';

test('index page has expected h1', async ({ page }) => {
	await page.goto('/');
	await expect(page.getByRole('heading', { name: 'Hello Skeleton' })).toBeVisible();
});
/** @type {import('@playwright/test').PlaywrightTestConfig} */
const config = {
	webServer: {
		command: 'npm run build && npm run preview',
		port: 4173
	},
	testDir: './tests'
};

export default config;

Describe the bug

The tests suddenly stopped working when updating to 1.33.0. Reverting back to 1.32.3 fixed the issue of "No tests found".

image

@aslushnikov
Copy link
Collaborator

@MrVauxs can you provide a small github repo that demonstrates this?

@aslushnikov
Copy link
Collaborator

@MrVauxs ah! You should rename the test.js file into test.spec.js. This is a bugfix in 1.33: the test.js was never supposed to be a spec file.

@MrVauxs
Copy link
Author

MrVauxs commented May 1, 2023

I was simply working off of sveltekit default project, huh.

@MrVauxs
Copy link
Author

MrVauxs commented May 1, 2023

SvelteKit Issue: sveltejs/kit#9793

I have followed their fix and instead changed the testMatch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants