Skip to content

Commit

Permalink
Resolve path
Browse files Browse the repository at this point in the history
  • Loading branch information
develeon committed Sep 13, 2024
1 parent ef02202 commit 5239c68
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,21 @@ import caliban.tools._
object ValidateGraphQlSpec extends SnapshotTest {
override val testName: String = "ValidateGraphQlSpec"

val outFolder = SnapshotTest.projectRoot.resolve("codegen-sbt/src/sbt-test/compiletime-codegen/test-compile/modules/posts/src/test/resources/")
val userDir: Path = Path.of(sys.props("user.dir"))

// val outFolder : Path = SnapshotTest.projectRoot.resolve("codegen-sbt/src/sbt-test/compiletime-codegen/test-compile/modules/posts/src/test/resources/")

override def spec =
suite("Validate Postservice")(
test("Render postservice as earlier") {
val gqlApi = GraphQLApi.api
val renderContent: String = s"${gqlApi.render}"

writeAndCompare(outFolder.resolve("postservice.graphql"), renderContent, "Render postservice")
println(s"userDir: ${userDir}")



writeAndCompare(userDir.resolve("/test-compile/modules/posts/src/test/resources/postservice.graphql"), renderContent, "Render postservice")
}
)
}

0 comments on commit 5239c68

Please sign in to comment.