Skip to content

Fix main-street-tutorial-e2e 'require is not defined' test failures #595

Description

@SorraTheOrc

Fix main-street-tutorial-e2e 'require is not defined' test failures

Problem

The test file tests/e2e/main-street-tutorial-e2e.browser.test.ts uses require() at line 156 to dynamically import getCurrentStep from a game module. Since the project runs in ESM mode (Vite/Vitest), require is not defined, causing all 9 tests in the file to fail.

Fix

Replace the require() call with a top-level import to make it work in ESM context.

Acceptance Criteria

  1. All 9 tests in tests/e2e/main-street-tutorial-e2e.browser.test.ts pass
  2. The module is imported correctly without using require()
  3. Full test suite continues to pass (npm test)
  4. Build succeeds (npm run build)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions