Skip to content

Commit

Permalink
Merge pull request #32 from sbt/latest_mocha
Browse files Browse the repository at this point in the history
Latest mocha 10.2.0
  • Loading branch information
mkurz authored Jan 29, 2024
2 parents 173dca6 + b8f6849 commit b080117
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
8 changes: 7 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ addSbtJsEngine("1.3.5")

libraryDependencies ++= Seq(
"org.webjars.npm" % "node-require-fallback" % "1.0.0",
"org.webjars" % "mocha" % "1.17.1", // sync with src/main/resources/com/typesafe/sbt/mocha/mocha.js
"org.webjars.npm" % "mocha" % "10.2.0", // sync with src/main/resources/com/typesafe/sbt/mocha/mocha.js
"org.webjars.npm" % "minimatch" % "9.0.3",
)

// Customise sbt-dynver's behaviour to make it work with tags which aren't v-prefixed
Expand All @@ -29,3 +30,8 @@ Global / onLoad := (Global / onLoad).value.andThen { s =>
dynverAssertTagVersion.value
s
}

scriptedLaunchOpts ++= Seq(
"-Xmx512M",
"-XX:MaxMetaspaceSize=512M",
)
2 changes: 1 addition & 1 deletion src/main/resources/com/typesafe/sbt/mocha/mocha.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var requireIfExists = require('node-require-fallback');

var Mocha = requireIfExists("mocha/1.17.1", "mocha"); // sync with build.sbt
var Mocha = requireIfExists("mocha/10.2.0", "mocha"); // sync with build.sbt

var mocha = new Mocha();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ addSbtPlugin("com.github.sbt" % "sbt-mocha" % sys.props("project.version"))
// and no subfolder will be forced for that case but the newest version will be choosen. Like normal dependency resolution.
libraryDependencies ++= Seq(
// Pulling in the classic and the npm webjar to subfolders for this webjar will be created
("org.webjars.npm" % "mocha" % "3.0.0-2")
.exclude("org.webjars.npm", "debug")
.exclude("org.webjars.npm", "diff"),
"org.webjars" % "mocha" % "1.17.1",
"org.webjars.npm" % "mocha" % "3.0.0-2",
("org.webjars" % "mocha" % "1.17.1")
.exclude("org.webjars", "debug")
.exclude("org.webjars", "diff"),
)
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,4 @@
> logged error "Error: Total 9, Failed 1, Errors 1, Passed 7"

$ exists project/target/node-modules/webjars/mocha/1.17.1
$ exists project/target/node-modules/webjars/mocha/3.0.0-2
$ exists project/target/node-modules/webjars/mocha/10.2.0

0 comments on commit b080117

Please sign in to comment.