File tree Expand file tree Collapse file tree 4 files changed +40
-17
lines changed
resources/snapshots/example Expand file tree Collapse file tree 4 files changed +40
-17
lines changed Original file line number Diff line number Diff line change 11version = "3.7.17"
22
33runner.dialect = scala212source3
4- # rewrite.scala3.insertEndMarkerMinLines = 10
5- # rewrite.scala3.removeOptionalBraces = true
6- # rewrite.scala3.convertToNewSyntax = true
74align.preset = more
85
9- # fileOverride {
10- # "glob:**.sbt" {
11- # runner.dialect = scala212source3
12- # }
6+ fileOverride {
7+ # "glob:**.sbt" {
8+ # runner.dialect = scala212source3
9+ # }
1310
14- # "glob:**/project/**.*" {
15- # runner.dialect = scala212source3
16- # }
11+ # "glob:**/project/**.*" {
12+ # runner.dialect = scala212source3
13+ # }
1714
18- # "glob:**/snapshots-sbt-plugin/**.*" {
19- # runner.dialect = scala212source3
20- # }
15+ # "glob:**/snapshots-sbt-plugin/**.*" {
16+ # runner.dialect = scala212source3
2117
22- # "glob:**/snapshots-buildtime/**.*" {
23- # runner.dialect = scala212source3
24- # }
25- # }
18+ "glob:**/scala-3/**.*" {
19+ runner.dialect = scala3
20+ rewrite.scala3.insertEndMarkerMinLines = 10
21+ rewrite.scala3.removeOptionalBraces = true
22+ rewrite.scala3.convertToNewSyntax = true
23+ }
24+ }
Original file line number Diff line number Diff line change @@ -78,6 +78,7 @@ lazy val example = projectMatrix
7878 snapshotsPackageName := " example" ,
7979 snapshotsAddRuntimeDependency := false ,
8080 snapshotsIntegrations += SnapshotIntegration .MUnit ,
81+ libraryDependencies += " io.circe" %%% " circe-core" % " 0.14.6" ,
8182 noPublish
8283 )
8384 .enablePlugins(SnapshotsPlugin )
Original file line number Diff line number Diff line change 1+ {
2+ "Hello" : {
3+ "a" : 25,
4+ "b" : {
5+ "s" : "yo"
6+ }
7+ }
8+ }
Original file line number Diff line number Diff line change 1+ import com .indoorvivants .snapshots .munit_integration .*
2+ import munit .*
3+
4+ import io .circe .* , io .circe .syntax .*
5+
6+ case class Test (s : String )
7+ enum MyStuff derives Codec .AsObject :
8+ case Hello (a : Int , b : Test )
9+ case Bla (x : Boolean )
10+
11+ class JsonGoldenTests extends FunSuite with MunitSnapshotsIntegration :
12+ test(" json tests" ) {
13+ val obj = MyStuff .Hello (25 , Test (" yo" ))
14+ assertSnapshot(" json.codec" , obj.asJson.spaces4)
15+ }
You can’t perform that action at this time.
0 commit comments