Set working directory for tests (#36)

This commit is contained in:
Patrick Stevens
2024-06-06 20:50:48 +01:00
committed by GitHub
parent edfa216809
commit c6f339c738
5 changed files with 25 additions and 7 deletions

View File

@@ -9,8 +9,15 @@ open NUnit.Framework
module TestAppDomain =
[<Test>]
let ``Can load config`` () =
let ``Can load config from app domain`` () =
Path.Combine (AppDomain.CurrentDomain.BaseDirectory, "some-config.json")
|> File.ReadAllText
|> fun s -> s.Trim ()
|> shouldEqual """{"hi":"bye"}"""
[<Test>]
let ``Can load config from working dir`` () =
"some-config.json"
|> File.ReadAllText
|> fun s -> s.Trim ()
|> shouldEqual """{"hi":"bye"}"""