Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
100 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
modules/snapshots-sbt-plugin/src/sbt-test/basic/force-overwrite/build.sbt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
lazy val root = projectMatrix | ||
.in(file(".")) | ||
.jvmPlatform(Seq("3.3.1", "2.13.12")) | ||
.nativePlatform(Seq("3.3.1")) | ||
.jsPlatform(Seq("3.3.1")) | ||
.settings( | ||
snapshotsPackageName := "example.bla", | ||
snapshotsIntegrations += SnapshotIntegration.MUnit, | ||
libraryDependencies += | ||
"org.scalameta" %%% "munit" % "1.0.0-M7" % Test, | ||
scalaJSLinkerConfig ~= (_.withModuleKind(ModuleKind.CommonJSModule)), | ||
snapshotsForceOverwrite := true, | ||
check := { | ||
val dir = | ||
(Test / resourceDirectory).value / "snapshots" / snapshotsProjectIdentifier.value | ||
|
||
val contents = IO.read(dir / "my.snapshot") | ||
val expected = "hello - more stuff" | ||
|
||
assert( | ||
contents == expected, | ||
s"Snapshot contents didn't match: expected `$expected`, got `$contents`" | ||
) | ||
|
||
} | ||
) | ||
.enablePlugins(SnapshotsPlugin) | ||
|
||
val check = taskKey[Unit]("") |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
9 changes: 9 additions & 0 deletions
9
modules/snapshots-sbt-plugin/src/sbt-test/basic/force-overwrite/test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
$ exists src/test/resources/snapshots/root3/my.snapshot | ||
$ exists src/test/resources/snapshots/rootNative3/my.snapshot | ||
$ exists src/test/resources/snapshots/rootJS3/my.snapshot | ||
> root3/test | ||
> rootNative3/test | ||
> rootJS3/test | ||
> root3/check | ||
> rootNative3/check | ||
> rootJS3/check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
modules/snapshots-sbt-plugin/src/sbt-test/basic/project-matrix/project/plugins.sbt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
addSbtPlugin( | ||
"com.indoorvivants.snapshots" % "sbt-snapshots" % sys.props("plugin.version") | ||
) | ||
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.17") | ||
addSbtPlugin("com.eed3si9n" % "sbt-projectmatrix" % "0.9.1") | ||
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.14.0") |
Empty file.
Empty file.
Empty file.
10 changes: 10 additions & 0 deletions
10
modules/snapshots-sbt-plugin/src/sbt-test/basic/project-matrix/src/test/scala/Tests.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package example.bla | ||
|
||
import com.indoorvivants.snapshots.munit_integration._ | ||
import munit._ | ||
|
||
class MunitExampleTests extends FunSuite with MunitSnapshotsIntegration { | ||
test("hello") { | ||
assertSnapshot("my.snapshot", "hello - more stuff") | ||
} | ||
} |
File renamed without changes.