Closed JenH11 closed 1 year ago
Your test file seems to be the same as your teardown, did you share a wrong file? I'm also not seeing error anywhere in your report.
We need more information to act on this report. As long as we can't repro it, it is unlikely with can make progress with it. Allow me to close it, but please file a new one and link to this issue when you get back to it!
Config file
projects: [ { name: 'setup', testDir: './', testMatch:'global_setup.ts', teardown: 'teardown', }, { name: 'chromium', retries: 0, dependencies: ['setup'], use: { headless: false, ...devices['Desktop Chrome'], launchOptions: { slowMo: !process.env.SLOMO ? 0 : parseInt(process.env.SLOMO), proxy: { server: 'http://172.16.2.155:3128' }, }, }, }, { name: 'teardown', testDir:'./', testMatch:'global_teardown.ts' }, ],
Test file (self-contained)
import fs from 'fs' import { test as teardown} from '@playwright/test';
teardown('Unlink state storage file', async ({ }) => { fs.readdirSync('./state-storage').forEach(filePath => { if (filePath.endsWith('.json')) { fs.unlink(
./state-storage/${filePath}
, (err) => { console.log(err); }); } }); });Expected The tests execute within these projects and in this order - setup, chromium, project
Actual Tests do not execute and an error occurs