Skip to content

Fix some tests by using runSessionWithServerInTmpDir instead of runSessionWithConfig #5054

Description

@Aster89

@fendor noticed that #5020 fails because fourmolu tries to read the haskell-language-server.cabal during the test. It shouldn't, that's probably some implicit fourmolu/ormolu behaviour looking for a .cabal file.

If we run the tests in temporary directories, then we might be able to merge that PR after all. (Not really, because of Debian, see #5020 (comment).)

Instead of runSessionWithConfig, we should be using our test runners that copy the directory into a temporary directory, e.g. goldenWithHaskellDocInTmpDir or goldenWithHaskellDocFormatterInTmpDir

Probably rather runSessionWithServerInTmpDir since the tests modify the configuration during the tests.

Activity

  1. self-assigned this
    on Aug 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions