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

[Bug]: Teardown hook not executed #35179

Closed
xianyulli opened this issue Mar 13, 2025 · 2 comments
Closed

[Bug]: Teardown hook not executed #35179

xianyulli opened this issue Mar 13, 2025 · 2 comments

Comments

@xianyulli
Copy link

xianyulli commented Mar 13, 2025

Version

1.51.0

Steps to reproduce

playwright.config

export default defineConfig({
  testDir: '.',
  /* Run tests in files in parallel */
  fullyParallel: true,
  /* Fail the build on CI if you accidentally left test.only in the source code. */
  forbidOnly: !!process.env.CI,
  retries: 0,
  /* Opt out of parallel tests on CI. */
  workers: 5,
  /* Reporter to use. See https://playwright.dev/docs/test-reporters */
  reporter: 'html',
  /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
  /* Configure projects for major browsers */
  projects: [
    {
      name: 'setup',
      testMatch: /global.setup\.ts/,
      teardown: 'teardown',
    },
    {
      name: 'teardown',
      testMatch: /global.teardown\.ts/,
      teardown: 'teardown',
    },
    {
      name: 'chromium',
      use: {
        ...devices['Desktop Chrome'],
        trace: 'on-first-retry',
        storageState: authFile,
      },
      dependencies: ['setup'],
    },
  ],
});

Expected behavior

Looking forward to execution and global.tardown.ts can also take over global variables

Actual behavior

not executed

Additional context

No response

Environment

"@playwright/test": "^1.51.0"
"node": v18.20.4
MacOS 14.5
@agg23
Copy link
Contributor

agg23 commented Mar 13, 2025

Please provide detailed repro instructions with a minimal failing code setup. Without that repro it is very difficult to help.

@agg23
Copy link
Contributor

agg23 commented Mar 18, 2025

Closing as part of the triage process since it seemed stale. Please create a new issue with a detailed reproducible or feature request if you still face issues.

@agg23 agg23 closed this as not planned Won't fix, can't repro, duplicate, stale Mar 18, 2025
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