Skip to content

Commit

Permalink
Rename KotlinJsNodeRunTests tests so that they can be called individu…
Browse files Browse the repository at this point in the history
…ally on the command-line (#3999)

Recently ran into one of them being red on the CI, and I couldn't run
the failing test locally because of the `{` or `/` in the test names. So
that PR simplifies those names.
  • Loading branch information
alexarchambault authored Nov 22, 2024
1 parent eb11ca9 commit dd856fb
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions kotlinlib/test/src/mill/kotlinlib/js/KotlinJsNodeRunTests.scala
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@ object KotlinJsNodeRunTests extends TestSuite {
def tests: Tests = Tests {
// region with split per module

test("run { split per module / plain module }") {
test("split - plain module") {
val eval = testEval()

// plain modules cannot handle the dependencies, so if there are multiple js files, it will fail
val Left(_) = eval.apply(module.foo(true, "plain").run())
}

test("run { split per module / es module }") {
test("split - es module") {
val eval = testEval()

val command = module.foo(true, "es").run()
Expand All @@ -65,14 +65,14 @@ object KotlinJsNodeRunTests extends TestSuite {
assertLogContains(eval, command, expectedSuccessOutput)
}

test("run { split per module / amd module }") {
test("split - amd module") {
val eval = testEval()

// amd modules have "define" method, it is not known by Node.js
val Left(_) = eval.apply(module.foo(true, "amd").run())
}

test("run { split per module / commonjs module }") {
test("split - commonjs module") {
val eval = testEval()

val command = module.foo(true, "commonjs").run()
Expand All @@ -81,7 +81,7 @@ object KotlinJsNodeRunTests extends TestSuite {
assertLogContains(eval, command, expectedSuccessOutput)
}

test("run { split per module / umd module }") {
test("split - umd module") {
val eval = testEval()

val command = module.foo(true, "umd").run()
Expand All @@ -90,7 +90,7 @@ object KotlinJsNodeRunTests extends TestSuite {
assertLogContains(eval, command, expectedSuccessOutput)
}

test("run { split per module / no module }") {
test("split - no module") {
val eval = testEval()

val Left(_) = eval.apply(module.foo(true, "no").run())
Expand All @@ -100,7 +100,7 @@ object KotlinJsNodeRunTests extends TestSuite {

// region without split per module

test("run { no split per module / plain module }") {
test("no split - plain module") {
val eval = testEval()

val command = module.foo(false, "plain").run()
Expand All @@ -109,7 +109,7 @@ object KotlinJsNodeRunTests extends TestSuite {
assertLogContains(eval, command, expectedSuccessOutput)
}

test("run { no split per module / es module }") {
test("no split - es module") {
val eval = testEval()

val command = module.foo(false, "es").run()
Expand All @@ -118,14 +118,14 @@ object KotlinJsNodeRunTests extends TestSuite {
assertLogContains(eval, command, expectedSuccessOutput)
}

test("run { no split per module / amd module }") {
test("no split - amd module") {
val eval = testEval()

// amd modules have "define" method, it is not known by Node.js
val Left(_) = eval.apply(module.foo(false, "amd").run())
}

test("run { no split per module / commonjs module }") {
test("no split - commonjs module") {
val eval = testEval()

val command = module.foo(false, "commonjs").run()
Expand All @@ -134,7 +134,7 @@ object KotlinJsNodeRunTests extends TestSuite {
assertLogContains(eval, command, expectedSuccessOutput)
}

test("run { no split per module / umd module }") {
test("no split - umd module") {
val eval = testEval()

val command = module.foo(false, "umd").run()
Expand All @@ -143,7 +143,7 @@ object KotlinJsNodeRunTests extends TestSuite {
assertLogContains(eval, command, expectedSuccessOutput)
}

test("run { no split per module / no module }") {
test("no split - no module") {
val eval = testEval()

val command = module.foo(false, "no").run()
Expand Down

0 comments on commit dd856fb

Please sign in to comment.