Skip to content
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

fix: std/testing/runner.ts and deno test #4392

Merged
merged 10 commits into from
Mar 19, 2020

Conversation

bartlomieju
Copy link
Member

@bartlomieju bartlomieju commented Mar 16, 2020

After splitting failFast and exitOnFail arguments, there was a situation where failing tests did not exit with code 1.

Fixed:

  • argument value passed to Deno.runTests() in deno test
  • argument value passed to Deno.runTests() in std/testing/runner.ts
  • added integration tests for deno test to ensure failFast and exitOnFail work as expected
  • doesn't write test file to FS, but keeps it in memory

Closes #4413

@nayeemrmn

This comment has been minimized.

@bartlomieju bartlomieju changed the title fix: std/testing/runner.ts fix: std/testing/runner.ts and deno test Mar 16, 2020
cli/lib.rs Outdated
// Interpolated with pid, because multiple deno process may be run in current
// directory to run tests.
let filename = format!(".deno.{}.test.ts", std::process::id());
let test_file_path = cwd.join(filename);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a good reason to place this in the cwd? Why not a temp file?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I think it was to avoid recompilation for repeat deno test in the same conditions but if the name is different each time that doesn't apply anymore.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nayeemrmn good point, now I forgot about it :/ I hit issue of name collision when I added two integration tests for runner - both of them create file almost simultaneously and one of the test is failing.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed writing to fs completely, used the same logic as for deno eval and deno (repl). Let's see how this works out

Copy link
Member

@ry ry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bartlomieju bartlomieju merged commit 8de4a05 into denoland:master Mar 19, 2020
@bartlomieju bartlomieju deleted the fix_std_test_runner branch March 19, 2020 13:26
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 21, 2021
After splitting "failFast" and "exitOnFail" arguments, there was a situation where failing tests did not exit with code 1.

* fixed argument value passed to Deno.runTests() in deno test
* fixed argument value passed to Deno.runTests() in std/testing/runner.ts
* added integration tests for deno test to ensure failFast and exitOnFail work as expected
* don't write test file to file system, but keep it in memory
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 24, 2021
After splitting "failFast" and "exitOnFail" arguments, there was a situation where failing tests did not exit with code 1.

* fixed argument value passed to Deno.runTests() in deno test
* fixed argument value passed to Deno.runTests() in testing/runner.ts
* added integration tests for deno test to ensure failFast and exitOnFail work as expected
* don't write test file to file system, but keep it in memory
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 24, 2021
After splitting "failFast" and "exitOnFail" arguments, there was a situation where failing tests did not exit with code 1.

* fixed argument value passed to Deno.runTests() in deno test
* fixed argument value passed to Deno.runTests() in testing/runner.ts
* added integration tests for deno test to ensure failFast and exitOnFail work as expected
* don't write test file to file system, but keep it in memory
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 24, 2021
After splitting "failFast" and "exitOnFail" arguments, there was a situation where failing tests did not exit with code 1.

* fixed argument value passed to Deno.runTests() in deno test
* fixed argument value passed to Deno.runTests() in testing/runner.ts
* added integration tests for deno test to ensure failFast and exitOnFail work as expected
* don't write test file to file system, but keep it in memory
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 31, 2021
After splitting "failFast" and "exitOnFail" arguments, there was a situation where failing tests did not exit with code 1.

* fixed argument value passed to Deno.runTests() in deno test
* fixed argument value passed to Deno.runTests() in testing/runner.ts
* added integration tests for deno test to ensure failFast and exitOnFail work as expected
* don't write test file to file system, but keep it in memory
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 31, 2021
After splitting "failFast" and "exitOnFail" arguments, there was a situation where failing tests did not exit with code 1.

* fixed argument value passed to Deno.runTests() in deno test
* fixed argument value passed to Deno.runTests() in testing/runner.ts
* added integration tests for deno test to ensure failFast and exitOnFail work as expected
* don't write test file to file system, but keep it in memory
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 31, 2021
After splitting "failFast" and "exitOnFail" arguments, there was a situation where failing tests did not exit with code 1.

* fixed argument value passed to Deno.runTests() in deno test
* fixed argument value passed to Deno.runTests() in testing/runner.ts
* added integration tests for deno test to ensure failFast and exitOnFail work as expected
* don't write test file to file system, but keep it in memory
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 31, 2021
After splitting "failFast" and "exitOnFail" arguments, there was a situation where failing tests did not exit with code 1.

* fixed argument value passed to Deno.runTests() in deno test
* fixed argument value passed to Deno.runTests() in testing/runner.ts
* added integration tests for deno test to ensure failFast and exitOnFail work as expected
* don't write test file to file system, but keep it in memory
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Feb 1, 2021
After splitting "failFast" and "exitOnFail" arguments, there was a situation where failing tests did not exit with code 1.

* fixed argument value passed to Deno.runTests() in deno test
* fixed argument value passed to Deno.runTests() in testing/runner.ts
* added integration tests for deno test to ensure failFast and exitOnFail work as expected
* don't write test file to file system, but keep it in memory
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

deno test always returns 0 exit code
3 participants