-
Notifications
You must be signed in to change notification settings - Fork 4
Fix #17: Fail run in NodeJSEnv if ESModule fails #18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@sjrd does this need a minor version bump? From a JSEnvSuite POV, probably yes, from a NodeJSEnv POV no... |
6e844f2
to
4a0110d
Compare
Hrm.. Mima fails on the test classes. Not sure what to think about that. Shall we just exclude them? |
val withComValues = | ||
if (config.supportsCom) List(TRUE, FALSE) | ||
else List(TRUE, FALSE) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm pretty sure this should be
val withComValues = | |
if (config.supportsCom) List(TRUE, FALSE) | |
else List(TRUE, FALSE) | |
val withComValues = | |
if (config.supportsCom) List(TRUE, FALSE) | |
else List(FALSE) |
if (config.supportsTimeout) | ||
runners.add(r[TimeoutComTests](config)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (config.supportsTimeout) | |
runners.add(r[TimeoutComTests](config)) | |
if (config.supportsTimeout && config.supportsCom) | |
runners.add(r[TimeoutComTests](config)) |
I think?
js-envs-test-kit/src/main/scala/org/scalajs/jsenv/test/JSEnvSuiteConfig.scala
Show resolved
Hide resolved
if (config.supportsTimeout) | ||
runners.add(r[TimeoutComTests](config)) | ||
if (config.supportsTimeout) { | ||
for (inputKind <- inputKindValues) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one appears in every case. Have you considered surrounding the entire thing with a single for (inputKind <- inputKindValues)
?
@@ -41,15 +41,17 @@ import org.scalajs.jsenv._ | |||
* }}} | |||
* | |||
* @note Methods in [[TestKit]] allow to take a string instead of an [[Input]]. | |||
* The string is converted into an input form supported by the [[JSEnv]] to | |||
* execute the code therein. | |||
* The string is converted into an input via `defaultInput`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* The string is converted into an input via `defaultInput`. | |
* The string is converted into an input via `defaultInputKind`. |
|
||
private def codeToInput(code: String): Seq[Input] = { | ||
val p = Files.write( | ||
Jimfs.newFileSystem().getPath("testScript.js"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Jimfs.newFileSystem().getPath("testScript.js"), | |
Jimfs.newFileSystem().getPath("test.js"), |
I guess it doesn't make sense to kill this testScript.js
anymore.
nodejs-env/src/test/scala/org/scalajs/jsenv/nodejs/NodeJSSuite.scala
Outdated
Show resolved
Hide resolved
IIUC they're all |
82089d8
to
855a7eb
Compare
I guess I was very tired when I sent this 🤷 I think I have addressed all the comments. The question RE minor version bump still stands. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it deserves a minor version bump, yes. The test kit is part of the public API of this repo. Also I don't think there's any reason that a minor version bump for the JSEnv part would cause any trouble.
build.sbt
Outdated
ProblemFilters.exclude[Problem]("org.scalajs.jsenv.test.TimeoutComTests.*") | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ProblemFilters.exclude[Problem]("org.scalajs.jsenv.test.TimeoutComTests.*") | |
) | |
ProblemFilters.exclude[Problem]("org.scalajs.jsenv.test.TimeoutComTests.*"), | |
), |
As we add more variables to the test matrix, assuming the unneeded ones away becomes too cumbersome.
855a7eb
to
5ea4d40
Compare
No description provided.