MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / test_node_eval

Method test_node_eval

test/test_other.py:10433–10441  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

10431
10432 @requires_node
10433 def test_node_eval(self):
10434 if not self.engine_is_node():
10435 # The `requires_node` decorator above also allows for node-like environments such as
10436 # deno and bun, but this test requires actual node.
10437 self.skipTest('requires nodejs')
10438 self.run_process([EMCC, '-sENVIRONMENT=node', test_file('hello_world.c'), '-o', 'a.js', '-O3'])
10439 js = read_file('a.js')
10440 ret = self.run_process(self.get_current_js_engine() + ['-e', js], stdout=PIPE).stdout
10441 self.assertContained('Hello, world!', ret)
10442
10443 def test_is_bitcode(self):
10444 fname = 'tmp.o'

Callers

nothing calls this directly

Calls 6

test_fileFunction · 0.90
read_fileFunction · 0.90
engine_is_nodeMethod · 0.80
run_processMethod · 0.80
get_current_js_engineMethod · 0.80
assertContainedMethod · 0.80

Tested by

no test coverage detected