summaryrefslogtreecommitdiff
path: root/cli/tests/integration/test_tests.rs
AgeCommit message (Collapse)Author
2022-04-19perf(runtime): bypass tokio file and bump op buffer size to 64K (#14319)Divy Srivastava
2022-04-18feat: Add DENO_NO_PROMPT variable (#14209)Nayeem Rahman
This commit adds support for "DENO_NO_PROMPT" env variable, that can be used instead of "--no-prompt" flag to completely disable permission prompts.
2022-04-17fix: panic when trying to pledge permissions before restoring previous ↵Bartek Iwańczuk
pledge (#14306) This commit fixes and edge case, where testing/benching code could pledge new permission set before restoring the previous pledge. Appropriate panics were added and tests that assert that process is killed in case of "recursive pledge".
2022-04-15refactor: Move source map lookups to core (#14274)Nayeem Rahman
The following transformations gradually faced by "JsError" have all been moved up front to "JsError::from_v8_exception()": - finding the first non-"deno:" source line; - moving "JsError::script_resource_name" etc. into the first error stack in case of syntax errors; - source mapping "JsError::script_resource_name" etc. when wrapping the error even though the frame locations are source mapped earlier; - removing "JsError::{script_resource_name,line_number,start_column,end_column}" entirely in favour of "js_error.frames.get(0)". We also no longer pass a js-side callback to "core/02_error.js" from cli. I avoided doing this on previous occasions because the source map lookups were in an awkward place.
2022-04-15feat(test): format user code output (#14271)Bartek Iwańczuk
This commit changes "deno test" to better denote user output coming from test cases. This is done by printing "---- output ----" and "---- output end ----" markers if an output is produced. The output from "console" and "Deno.core.print" is captured, as well as direct writes to "Deno.stdout" and "Deno.stderr". To achieve that new APIs were added to "deno_core" crate, that allow to replace an existing resource with a different one (while keeping resource ids intact). Resources for stdout and stderr are replaced by pipes. Co-authored-by: David Sherret <dsherret@gmail.com>
2022-04-11feat(test): Improve testing report output (#14255)Bartek Iwańczuk
Following changes were done in this commit: - remove "test" prefix before each test - use gray color for "running N tests from ..." prompt - use relative path or remote URL instead of full URL in "running N tests from ..." prompt - in "failures" section, add file path/remote URL before the test name Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
2022-03-23fix(test): don't error on missing op details (#14074)Bartek Iwańczuk
2022-03-11fix(test): skip typechecking for blocks inside HTML comments (#13889)Geert-Jan Zwiers
2022-03-08fix(test): typecheck blocks annotated with long js/ts notations (#13785)Geert-Jan Zwiers
2022-02-26fix(test): use --no-prompt by default (#13777)Bartek Iwańczuk
This commit changes "deno test" subcommand, to always never prompt for permissions (ie. as if "deno test" was run with "--no-prompt" flag).
2022-02-25feat: deno test --trace-ops (#13770)Bartek Iwańczuk
This commit adds "--trace-ops" flag to "deno test" subcommand. This flag enables saving of stack traces for async ops, that before were always saved. While the feature proved to be very useful it comes with a significant performance hit, it's caused by excessive source mapping of stack frames.
2022-01-25feat(test): better errors for resource sanitizer (#13296)Luca Casonato
This commit makes the errors produced from the resource sanitizer much more human readable. It does this by using real words rather than our "resource names" when referring to resources, and by giving helpful hints on how to clean up each of the resources.
2022-01-18feat: stabilize test steps API (#13400)David Sherret
2022-01-07chore: update copyright to 2022 (#13306)Ryan Dahl
Co-authored-by: Erfan Safari <erfanshield@outlook.com>
2021-12-07refactor(timers): refactor timers to use one async op per timer (#12862)Andreu Botella
This change also makes the timers implementation closer to the spec, and sets up the stage to implement AbortSignal.timeout() (whatwg/dom#1032). Fixes #8965 Fixes #10974 Fixes #11398
2021-11-30fix(test): Improve reliability of `deno test`'s op sanitizer with timers ↵Andreu Botella
(#12934) Although not easy to replicate in the wild, the `deno test` op sanitizer can fail when there are intervals that started before a test runs, since the op sanitizer can end up running in the time between the timer op for an interval's run resolves and the op for the next run starts. This change fixes that by adding a new macrotask callback that will run after the timer macrotask queue has drained. This ensures that there is a timer op if there are any timers which are unresolved by the time the op sanitizer runs.
2021-11-29Revert "fix(test): Improve reliability of `deno test`'s op sanitizer with ↵Bartek Iwańczuk
timers (#12908)" (#12929) This reverts commit d335343a79afbcfe719109af510fe7a1dd0df2e8.
2021-11-28fix(test): Improve reliability of `deno test`'s op sanitizer with timers ↵Andreu Botella
(#12908) Although not easy to replicate in the wild, the `deno test` op sanitizer can fail when there are intervals that started before a test runs, since the op sanitizer can end up running in the time between the timer op for an interval's run resolves and the op for the next run starts. This change fixes that by adding a new macrotask callback that will run after the timer macrotask queue has drained. This ensures that there is a timer op if there are any timers which are unresolved by the time the op sanitizer runs.
2021-11-23feat(test): Add more overloads for "Deno.test" (#12749)Bartek Iwańczuk
This commit adds 4 more overloads to "Deno.test()" API. ``` // Deno.test(function testName() { }); export function test(fn: (t: TestContext) => void | Promise<void>): void; // Deno.test("test name", { only: true }, function() { }); export function test( name: string, options: Omit<TestDefinition, "name">, fn: (t: TestContext) => void | Promise<void>, ): void; // Deno.test({ name: "test name" }, function() { }); export function test( options: Omit<TestDefinition, "fn">, fn: (t: TestContext) => void | Promise<void>, ): void; // Deno.test({ only: true }, function testName() { }); export function test( options: Omit<TestDefinition, "fn" | "name">, fn: (t: TestContext) => void | Promise<void>, ): void; ```
2021-11-15fix(test): support typechecking docs with CRLF line endings (#12748)Geert-Jan Zwiers
2021-10-11feat: provide ops details for ops sanitizer failures (#12188)Casper Beyer
2021-10-11feat(unstable/test): imperative test steps API (#12190)David Sherret
2021-09-30fix(runtime/testing): format aggregate errors (#12183)Casper Beyer
2021-09-04feat(cli): close test worker once all tests complete (#11727)Casper Beyer
2021-09-01fix(cli): retain path based test mode inference (#11878)Casper Beyer
2021-08-24feat(cli): add --ignore flag to test command (#11712)Casper Beyer
2021-08-15fix(test): dispatch load event before tests are run (#11708)Casper Beyer
2021-08-13test(cli): add test for test filtering (#11672)Casper Beyer
2021-08-12fix(cli): allow specifiers of unknown media types with test command (#11652)Casper Beyer
2021-07-29feat: type check codeblocks in Markdown file with "deno test --doc" (#11421)Casper Beyer
2021-07-26fix(cli): side-load test modules (#11515)Casper Beyer
This fixes a regression introduced in 1.9 where test modules became main modules by side loading them in a generated module.
2021-07-14test(cli): ensure clear timeout doesn't trigger sanitizers (#11396)Casper Beyer
2021-07-10Revert "feat(cli/tools/test_runner): add terse reporter (#11156)" (#11352)Ryan Dahl
it's another flag to understand, more code, and isn't something that anyone really needs. This reverts commit 9d57a4aaeb18461bbeeea30fc8ab8804357185c1.
2021-07-10feat(cli/tools/test_runner): add terse reporter (#11156)Casper Beyer
This commit adds "--terse" flag to "deno test" that makes testing reporter output one character per test case instead of one line per case. This is an unstable feature.
2021-07-05feat(test): add --shuffle flag to randomize test ordering (#11163)Casper Beyer
2021-07-05fix(runtime): ignored tests should not cause permission changes (#11278)Casper Beyer
2021-06-29test(cli): harden test runner tests (#11166)Casper Beyer
2021-06-27chore: split up integration_tests.rs into separate files (#11131)David Sherret