1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-13 16:26:08 -05:00
denoland-deno/tools/testdata
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
..
strace_summary.out Add syscall count benchmark for 002_hello.ts (#820) 2018-09-24 23:58:18 -04:00
strace_summary2.out Fix bug in strace parser (#3720) 2020-01-20 09:49:18 -05:00
time.out Add max memory benchmark (#2061) 2019-04-16 13:57:05 -04:00
wrk1.txt benchmarks: make latency benchmark less noisy (#2689) 2019-07-28 21:31:18 +00:00
wrk2.txt benchmarks: make latency benchmark less noisy (#2689) 2019-07-28 21:31:18 +00:00
wrk3.txt benchmarks: make latency benchmark less noisy (#2689) 2019-07-28 21:31:18 +00:00