Skip to content

Commit

Permalink
fix: process global in js
Browse files Browse the repository at this point in the history
- fix: export process global directly instead of merging objects

Signed-off-by: Sam Gammon <sam@elide.ventures>
  • Loading branch information
sgammon committed Jun 9, 2024
1 parent 55c83e3 commit c94d243
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 3 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -217,4 +217,26 @@ import elide.testing.annotations.TestCase
@Test fun `stubbed exit should not exit the vm`() {
stubbed.exit(0)
}

@Test fun `process global should always be present`() {
executeGuest {
// language=JavaScript
"""
const { ok } = require("node:assert");
ok(process);
"""
}
}

@Test fun `process global should provide stdout and stderr`() {
executeGuest {
// language=JavaScript
"""
const { ok } = require("node:assert");
ok(process);
ok(process.stdout);
ok(process.stderr);
"""
}
}
}

0 comments on commit c94d243

Please sign in to comment.