I'm in the process of migrating some test suites from Protractor to Playwright but keep getting this error when I try to run the Playwright tests with this command:
npx playwright test --project=testProject
Error: No named projects are specified in the configuration file
Any ideas what I'm missing here?
This is what my playwright.config.ts
looks like:
const config: PlaywrightTestConfig = {
reporter: [['list'], ['html', { outputFolder: 'playwright-report' }]],
timeout: 60000,
use: {
channel: 'chrome',
headless: true,
screenshot: 'only-on-failure',
},
projects: [
{
name: 'testProject',
testDir: './path/to/playwright-tests',
use: { baseURL: 'https://url.com/' },
},
],
};
export default config;