mirror of
https://github.com/denoland/deno.git
synced 2024-11-22 15:06:54 -05:00
aab1acaed1
Rewrites "cli/js/unit_test_runner.ts" to communicate with spawned subprocesses using TCP socket. * Rewrite "Deno.runTests()" by factoring out testing logic to private "TestApi" class. "TestApi" implements "AsyncIterator" that yields "TestEvent"s, which is an interface for different types of event occuring during running tests. * Add "reporter" argument to "Deno.runTests()" to allow users to provide custom reporting mechanism for tests. It's represented by "TestReporter" interface, that implements hook functions for each type of "TestEvent". If "reporter" is not provided then default console reporting is used (via "ConsoleReporter"). * Change how "unit_test_runner" communicates with spawned suprocesses. Instead of parsing text data from child's stdout, a TCP socket is created and used for communication. "unit_test_runner" can run in either "master" or "worker" mode. Former is responsible for test discovery and establishing needed permission combinations; while latter (that is spawned by "master") executes tests that match given permission set. * Use "SocketReporter" that implements "TestReporter" interface to send output of tests to "master" process. Data is sent as stringified JSON and then parsed by "master" as structured data. "master" applies it's own reporting logic to output tests to console (by reusing default "ConsoleReporter"). |
||
---|---|---|
.. | ||
compiler | ||
ops | ||
tests | ||
web | ||
buffer.ts | ||
build.ts | ||
colors.ts | ||
compiler.ts | ||
core.ts | ||
deno.ts | ||
diagnostics.ts | ||
diagnostics_util.ts | ||
error_stack.ts | ||
errors.ts | ||
file_info.ts | ||
files.ts | ||
globals.ts | ||
internals.ts | ||
io.ts | ||
lib.deno.ns.d.ts | ||
lib.deno.shared_globals.d.ts | ||
lib.deno.window.d.ts | ||
lib.deno.worker.d.ts | ||
main.ts | ||
net.ts | ||
permissions.ts | ||
plugins.ts | ||
process.ts | ||
rbtree.ts | ||
read_file.ts | ||
repl.ts | ||
runtime.ts | ||
runtime_main.ts | ||
runtime_worker.ts | ||
signals.ts | ||
symbols.ts | ||
testing.ts | ||
tls.ts | ||
util.ts | ||
version.ts | ||
write_file.ts |