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

Some tests are broken on main branch #11441

Closed
1 task
haivuw opened this issue Jul 9, 2024 · 1 comment
Closed
1 task

Some tests are broken on main branch #11441

haivuw opened this issue Jul 9, 2024 · 1 comment
Labels
needs triage Issue needs to be triaged

Comments

@haivuw
Copy link
Contributor

haivuw commented Jul 9, 2024

Astro Info

This is about running tests on main branch.
latest commit 75d118bf7f06f11df05b2337bf615e83c3681d0e

If this issue only occurs in one browser, which browser is a problem?

No response

Describe the Bug

These 2 tests are failing on main branch:

it('outDir is tree-shaken if not needed', async () => {

✖ outDir is tree-shaken if not needed (1.72359ms)
  TypeError [Error]: Cannot read properties of undefined (reading 'replace')
      at Object.readFile (file:///home/hl/ws/forks/astro/packages/astro/test/test-utils.js:217:22)
      at TestContext.<anonymous> (file:///home/hl/ws/forks/astro/packages/integrations/vercel/test/serverless-prerender.test.js:25:34)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      at async Test.run (node:internal/test_runner/test:574:9)
      at async Suite.processPendingSubtests (node:internal/test_runner/test:318:7)

This one only fails on my WSL (Ubuntu 22.04) setup:

it('renders 404 page when a route does not match the request', async () => {

✖ renders 404 page when a route does not match the request (1.939176ms)
  AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
  + actual - expected

  + ''
  - 'Something went horribly wrong!'
      at TestContext.<anonymous> (file:///home/hl/ws/forks/astro/packages/astro/test/ssr-error-pages.test.js:160:11)
      at async Test.run (node:internal/test_runner/test:574:9)
      at async Promise.all (index 0)
      at async Suite.run (node:internal/test_runner/test:810:7)
      at async Suite.processPendingSubtests (node:internal/test_runner/test:318:7) {
    generatedMessage: true,
    code: 'ERR_ASSERTION',
    actual: '',
    expected: 'Something went horribly wrong!',
    operator: 'strictEqual'
  }

What's the expected result?

pnpm build && pnpm test should pass.

Link to Minimal Reproducible Example

pnpm build && pnpm test on main

Participation

  • I am willing to submit a pull request for this issue.
@Princesseuh
Copy link
Member

Everything seems to work for me in local (Node v22.0.0) and on CI. Might've been a fluke or specific to your setup. As long as it works in CI, we're generally okay with things!

@Princesseuh Princesseuh closed this as not planned Won't fix, can't repro, duplicate, stale Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage Issue needs to be triaged
Projects
None yet
Development

No branches or pull requests

2 participants