summaryrefslogtreecommitdiff
path: root/cli
AgeCommit message (Collapse)Author
2020-03-13refactor: unit test runner communicates using TCP socket (#4336)Bartek Iwańczuk
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-13Remove doc strings from cli/js TS files (#4329)crowlKats
Co-authored-by: Ryan Dahl <ry@tinyclouds.org>
2020-03-12upgrade: Rust 1.42.0 (#4331)Ryan Dahl
2020-03-12Enable std tests in debug mode (#4332)Ryan Dahl
2020-03-11v0.36.0Ryan Dahl
2020-03-11Add waker to StreamResource to fix hang on close bugs (#4293)João Souto
2020-03-11reorg: Deno global initialization (#4317)Bartek Iwańczuk
2020-03-11move compiler API tests to integration tests (#4319)Bartek Iwańczuk
2020-03-11support permission mode in mkdir (#4286)dubiousjim
2020-03-11Stricter permissions for Deno.makeTemp* (#4318)dubiousjim
2020-03-11reorg: remove dispatch.ts, move signals, factor out web utils (#4316)Bartek Iwańczuk
- moves signal definition from "cli/js/process.ts" to "cli/js/signals.ts" - removes "cli/js/dispatch.ts" - removes "cli/js/types.ts" - moves web specific utilities to "cli/js/web/util.ts"
2020-03-11reorg: cli/js/compiler/, move more API to cli/js/web/ (#4310)Bartek Iwańczuk
- moves compiler implementation to "cli/js/compiler/" directory - moves more APIs to "cli/js/web": * "console.ts" * "console_table.ts" * "performance.ts" * "timers.ts" * "workers.ts" - removes some dead code from "cli/js/"
2020-03-11Improve dprint config (#4314)Ryan Dahl
2020-03-10doc(cli/flags): Reduce empty lines in help messages (#4312)Nayeem Rahman
2020-03-10refactor(cli/js/net): Cleanup iterable APIs (#4236)Nayeem Rahman
Listener and UDPConn are AsyncIterables instead of AsyncIterators. The [Symbol.asyncIterator]()s are defined as generators and the next() methods are gone. "Listener/Socket has been closed" errors are now BadResource.
2020-03-10Add Deno.umask (#4290)dubiousjim
2020-03-10refactor: Cleanup options object parameters (#4296)Nayeem Rahman
2020-03-10refactor: uncomment tests broken tests, use skip (#4311)Bartek Iwańczuk
* uncomment broken tests, use skip: - net_test.ts - url_test.ts - fetch_test.ts
2020-03-10Add global "quiet" flag (#4135)Florian Häglsperger
2020-03-09use Object instead of Map for promise table (#4309)Bartek Iwańczuk
2020-03-10reorg: move js runtime tests to cli/js/tests/ (#4250)Bartek Iwańczuk
All Deno runtime test files were moved to cli/js/tests/ directory. It makes a clear distinction that cli/js/tests/ contains code that is run under Deno runtime as opposed to code in cli/js/ which is used to create bundle and snapshot with "deno_typescript".
2020-03-10upgrade: dprint 0.8.0 (#4308)Ryan Dahl
2020-03-10reorg: move JS ops implementations to cli/js/ops/, part 3 (#4302)Bartek Iwańczuk
Following JS ops were moved to separate files in cli/js/ops directory: - net - tls - fs
2020-03-09reorg: move JS ops implementations to cli/js/ops/, part 2 (#4283)Bartek Iwańczuk
Following JS ops were moved to separate files in cli/js/ops directory: - io - process - worker_host - web_worker - plugins - timers - signal - permissions
2020-03-08disable test_raw_tty (#4282)Yusuke Sakurai
2020-03-08reorg: move JS ops implementations to cli/js/ops/, part 1 (#4264)Bartek Iwańczuk
Following JS ops were moved to separate files in cli/js/ops directory: - compiler - dispatch_json - dispatch_minimal - errors - fetch - fs_events - os - random - repl - resources - runtime_compiler - runtime - tty
2020-03-07Rename perm to mode (#4276)dubiousjim
There's a lot of variation in doc comments and internal code about whether chmod/0o777-style permissions are called `mode` or `perm`. (For example, mkdir and writeFile choose differently.) Had proposed earlier to go consistently with `perm`, but on balance devs prefer to go with `mode`.
2020-03-07upgrade rust dependencies (#4270)Ryan Dahl
2020-03-07refactor: remove cli/ops/files.rs (#4246)Bartek Iwańczuk
* "op_close" - moved to "cli/ops/resources.rs" * "op_seek", "op_open" - moved to "cli/ops/fs.rs" Co-authored-by: Ryan Dahl <ry@tinyclouds.org>
2020-03-07Improve run_and_collect_output (#4272)Ryan Dahl
* Fix flaky test test_permissions_net_listen_allow_localhost * Improve error reporting for run_and_collect_output
2020-03-06Fix flaky test test_permissions_net_listen_allow_localhost (#4271)Ryan Dahl
2020-03-06Add content type for wasm, fix encoding in wasm test fixture (#4269)Aurélien Bertron
2020-03-06Rename name/filename arguments to path (#4227)dubiousjim
There's a lot of variation in doc comments and internal code about whether the first parameter to file system calls is `path` or `name` or `filename`. For consistency, have made it always be `path`.
2020-03-06Fix unwanted ANSI Reset Sequence (#4268)João Souto
2020-03-06Rename readDir -> readdir (#4225)dubiousjim
2020-03-05fix: call unwatch when dropping FsEventsResource (#4266)Ryan Dahl
2020-03-05move Web APIs to cli/js/web/Bartek Iwańczuk
2020-03-05fix event target testsBartek Iwańczuk
2020-03-05Support async function and EventListenerObject as listeners (#4240)Ryan Dahl
2020-03-05Allow BadResource errors to take a custom message (#4251)Ryan Dahl
2020-03-05refactor: preliminary cleanup of Deno.runTests() (#4237)Bartek Iwańczuk
* refactor: preliminary cleanup of Deno.runTests() * Change time measurement to use new Date() instead of performance.now(). Because there is no guarantee that tests are run with "--allow-hr" using new Date() guarantees higher precision of 1ms instead of 2ms. * Support String type filter in "skip" and "only". * Split "exitOnFail" into "exitOnFail" and "failFast". Former tells if "runTests()" should exit with code 1 on test failure, while latter tells if "runTests()" should stop running tests on first failure. * Use "defer" to wait for unhandled promise rejection - this bit is funky and doesn't seem right, but for now it's just a rewrite from using "setTimeout". Intended to be fixed in later commits. * Remove global "__DENO_TEST_REGISTRY", don't expose list of registered tests (to be addressed in follow up commits) * Remove arbitrary slow test threshold; use uniform coloring instead
2020-03-05refactor: cleanup compiler runtimes (#4230)Bartek Iwańczuk
- Cleanup "tsCompilerOnMessage" by factoring out separate methods for each request type: * "compile" * "runtimeCompile" * "runtimeTranspile" - Simplify control flow of compiler workers by a) no longer calling "close()" in worker runtime after a single message; b) explicitly shutting down worker from host after a single message Co-authored-by: Ryan Dahl <ry@tinyclouds.org>
2020-03-04Remove unnecessary macro from cli/ops/tty.rs (#4254)Bert Belder
It contains a clippy issue, and there's no need for this macro anyway.
2020-03-04Remove Deno.errors.Other (#4249)Ryan Dahl
2020-03-04refactor: rewrite testPerm into unitTest (#4231)Bartek Iwańczuk
Rewrite "testPerm" helper function used for testing of internal runtime code. It's been renamed to "unitTest" and provides API that is extensible in the future by accepting optional "UnitTestOptions" argument. "test" helper was also removed and replaced by overloaded version of "unitTest" that takes only function argument. "UnitTestOptions" currently supports "perms" and "skip" options, where former works exactly as first argument to "testPerm" did, while the latter allows to conditionally skip tests.
2020-03-04Migrate internal bundles to System (#4233)Kitson Kelly
2020-03-04Fix `deno install` file name including extra dot on Windows (#4243)yuta0801
2020-03-03Disable flaky and broken tests (#4239)Ryan Dahl
2020-03-03add assertOps sanitizer in cli/js/ unit tests (#4209)Bartek Iwańczuk
* add "assertOps" test assertion which makes sure test case is not "leaking" ops - ie. after test finishes there are no pending async ops * apply "assertOps" to all tests in "cli/js/" * fix numerous tests leaking ops * document problem with edge case in "clearInterval" and "clearTimeout" implementation where they may leak async ops * move "cli/js/worker_test.ts" to "cli/tests/worker_test.ts" and run as integration test; workers leak ops because of missing "terminate" implementation
2020-03-03misc: reduce unnecesarry output in cli/js tests (#4182)Yusuke Sakurai
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>