1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-22 15:06:54 -05:00
denoland-deno/cli/js
Bartek Iwańczuk aab1acaed1
refactor: unit test runner communicates using TCP socket (#4336)
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").
2020-03-13 15:57:32 +01:00
..
compiler Remove doc strings from cli/js TS files (#4329) 2020-03-13 10:22:22 +01:00
ops Remove doc strings from cli/js TS files (#4329) 2020-03-13 10:22:22 +01:00
tests refactor: unit test runner communicates using TCP socket (#4336) 2020-03-13 15:57:32 +01:00
web Remove doc strings from cli/js TS files (#4329) 2020-03-13 10:22:22 +01:00
buffer.ts Remove doc strings from cli/js TS files (#4329) 2020-03-13 10:22:22 +01:00
build.ts Remove doc strings from cli/js TS files (#4329) 2020-03-13 10:22:22 +01:00
colors.ts refactor: rewrite deno test, add Deno.test() (#3865) 2020-02-11 12:01:56 +01:00
compiler.ts Remove doc strings from cli/js TS files (#4329) 2020-03-13 10:22:22 +01:00
core.ts Use globalThis to reference global scope (#3719) 2020-01-20 09:30:30 -05:00
deno.ts refactor: unit test runner communicates using TCP socket (#4336) 2020-03-13 15:57:32 +01:00
diagnostics.ts Remove doc strings from cli/js TS files (#4329) 2020-03-13 10:22:22 +01:00
diagnostics_util.ts Remove doc strings from cli/js TS files (#4329) 2020-03-13 10:22:22 +01:00
error_stack.ts Remove doc strings from cli/js TS files (#4329) 2020-03-13 10:22:22 +01:00
errors.ts Remove Deno.errors.Other (#4249) 2020-03-04 13:18:32 -05:00
file_info.ts Remove doc strings from cli/js TS files (#4329) 2020-03-13 10:22:22 +01:00
files.ts Remove doc strings from cli/js TS files (#4329) 2020-03-13 10:22:22 +01:00
globals.ts reorg: cli/js/compiler/, move more API to cli/js/web/ (#4310) 2020-03-11 10:53:06 +01:00
internals.ts Add Deno.symbols and move internal fields for test (#3693) 2020-01-16 19:42:58 -05:00
io.ts Remove doc strings from cli/js TS files (#4329) 2020-03-13 10:22:22 +01:00
lib.deno.ns.d.ts refactor: unit test runner communicates using TCP socket (#4336) 2020-03-13 15:57:32 +01:00
lib.deno.shared_globals.d.ts refactor: Cleanup options object parameters (#4296) 2020-03-10 12:08:58 -04:00
lib.deno.window.d.ts add window.self read-only property (#4131) 2020-02-26 11:49:38 +01:00
lib.deno.worker.d.ts Support loading additional TS lib files (#3863) 2020-02-19 00:34:11 -05:00
main.ts workers: basic event loop (#3828) 2020-02-11 10:04:59 +01:00
net.ts Remove doc strings from cli/js TS files (#4329) 2020-03-13 10:22:22 +01:00
permissions.ts Remove doc strings from cli/js TS files (#4329) 2020-03-13 10:22:22 +01:00
plugins.ts reorg: move JS ops implementations to cli/js/ops/, part 2 (#4283) 2020-03-09 15:18:02 +01:00
process.ts Remove doc strings from cli/js TS files (#4329) 2020-03-13 10:22:22 +01:00
rbtree.ts cli: replace timer map with red-black tree (#3218) 2019-10-31 17:11:58 -07:00
read_file.ts Remove doc strings from cli/js TS files (#4329) 2020-03-13 10:22:22 +01:00
repl.ts Remove doc strings from cli/js TS files (#4329) 2020-03-13 10:22:22 +01:00
runtime.ts Remove doc strings from cli/js TS files (#4329) 2020-03-13 10:22:22 +01:00
runtime_main.ts reorg: Deno global initialization (#4317) 2020-03-11 21:57:24 +01:00
runtime_worker.ts Remove doc strings from cli/js TS files (#4329) 2020-03-13 10:22:22 +01:00
signals.ts Remove doc strings from cli/js TS files (#4329) 2020-03-13 10:22:22 +01:00
symbols.ts Remove doc strings from cli/js TS files (#4329) 2020-03-13 10:22:22 +01:00
testing.ts refactor: unit test runner communicates using TCP socket (#4336) 2020-03-13 15:57:32 +01:00
tls.ts Remove doc strings from cli/js TS files (#4329) 2020-03-13 10:22:22 +01:00
util.ts Remove doc strings from cli/js TS files (#4329) 2020-03-13 10:22:22 +01:00
version.ts Remove doc strings from cli/js TS files (#4329) 2020-03-13 10:22:22 +01:00
write_file.ts Remove doc strings from cli/js TS files (#4329) 2020-03-13 10:22:22 +01:00