summaryrefslogtreecommitdiff
path: root/cli/tests/unit/timers_test.ts
AgeCommit message (Collapse)Author
2024-02-10chore: move cli/tests/ -> tests/ (#22369)Matt Mastracci
This looks like a massive PR, but it's only a move from cli/tests -> tests, and updates of relative paths for files. This is the first step towards aggregate all of the integration test files under tests/, which will lead to a set of integration tests that can run without the CLI binary being built. While we could leave these tests under `cli`, it would require us to keep a more complex directory structure for the various test runners. In addition, we have a lot of complexity to ignore various test files in the `cli` project itself (cargo publish exclusion rules, autotests = false, etc). And finally, the `tests/` folder will eventually house the `test_ffi`, `test_napi` and other testing code, reducing the size of the root repo directory. For easier review, the extremely large and noisy "move" is in the first commit (with no changes -- just a move), while the remainder of the changes to actual files is in the second commit.
2024-01-01chore: update copyright to 2024 (#21753)David Sherret
2023-11-10chore(cli): Migrate some unit tests to "Promise.withResolvers()" (#21128)Tareque Md Hanif
Migrate to use `Promise.withResolvers()` instead of `deferred` in some of the tests in `cli/tests/unit/`. Issue: #21041
2023-11-05chore: migrate to new deno_core and metrics (#21057)Matt Mastracci
- Uses the new OpMetrics system for sync and async calls - Partial revert of #21048 as we moved Array.fromAsync upstream to deno_core
2023-09-04Revert "refactor: rewrite ops that use 'deferred' to use 'op2(async(lazy))' ↵Bartek Iwańczuk
(#20303) (#20370) This reverts commit https://github.com/denoland/deno/commit/83426be6eead06c680ae527468aeaf8723543ff2. Includes a regression test.
2023-08-10fix(ext/timers): some timers are not resolved (#20055)Bartek Iwańczuk
Fixes https://github.com/denoland/deno/issues/19866
2023-05-22fix(ext/web): improve timers resolution for 0ms timeouts (#19212)Bartek Iwańczuk
This commit changes the implementation of `ext/web` timers, by using "op_void_async_deferred" for timeouts of 0ms. 0ms timeout is meant to be run at the end of the event loop tick and currently Tokio timers that we use to back timeouts have at least 1ms resolution. That means that 0ms timeout actually take >1ms. This commit changes that and runs 0ms timeout at the end of the event loop tick. One consequence is that "unrefing" a 0ms timer will actually keep the event loop alive (which I believe actually makes sense, the test we had only worked because the timeout took more than 1ms). Ref https://github.com/denoland/deno/issues/19034
2023-01-02chore: update copyright year to 2023 (#17247)David Sherret
Yearly tradition of creating extra noise in git.
2022-09-02fix(ext/timers): create primordial `eval` (#15110)Garcia
2022-06-13Remove unstable Deno.sleepSync (#14719)Ryan Dahl
Co-authored-by: David Sherret <dsherret@gmail.com>
2022-03-20fix: actually don't inherit runtime permissions (#14024)Luca Casonato
2022-03-14feat(ext/web): Add `AbortSignal.timeout()` (#13687)Andreu Botella
2022-03-12refactor(core): validate promise id in refOp (#13905)Yoshiya Hinosawa
2022-02-16feat(test): improved op sanitizer errors + traces (#13676)Luca Casonato
This commit improves the error messages for the `deno test` async op sanitizer. It does this in two ways: - it uses handwritten error messages for each op that could be leaking - it includes traces showing where each op was started This "async op tracing" functionality is a new feature in deno_core. It likely has a significant performance impact, which is why it is only enabled in tests.
2022-01-20chore: update copyright year (#13434)Yoshiya Hinosawa
2021-12-09feat(ext/timers): add refTimer, unrefTimer API (#12953)Yoshiya Hinosawa
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-23refactor: remove "unitTest" wrapper from cli/tests/unit (#12750)Bartek Iwańczuk
2021-09-23test(cli): align unit test permissions with runtime test permissions (#12189)Casper Beyer
2021-08-25chore(tests): improve unit tests using `deferred` (#11842)David Sherret
2021-08-05refactor(cli/tests): remove unnecessary void return types (#11577)Leo K
2021-06-25test(cli): refactor the usages of delay (#11098)Yoshiya Hinosawa
This PR refactors the usages of delay utility in js unit testing. The same utiliy is defined in several places with different names. This PR replaces those usages with the one provided in std/async/delay.ts to improve the readability and consistency of test code.
2021-05-10chore: upgrade crates (#10559)Bartek Iwańczuk
2021-04-12fix(runtime/js/timers): Use (0, eval) instead of eval() (#10103)Nayeem Rahman
2021-04-09chore: upgrade dependencies (#10094)Bartek Iwańczuk
This commit upgrades: - swc_ecmascript - swc_bundler - deno_doc - deno_lint - dprint-plugin-typescript
2021-01-11chore: update copyright to 2021 (#9092)Yusuke Tanaka
2021-01-06fix: stronger input checking for setTimeout; add function overload (#8957)Anonymous
2020-11-26refactor(cli/tests): replace createResolvable with deferred (#8507)crowlKats
2020-11-24feat(cli): update to TypeScript 4.1 (#7573)Kitson Kelly
2020-10-15feat(cli/ops): add the sleep_sync op (#7974)William Perron
2020-09-27feat(fmt): Sort named import and export specifiers (#7711)David Sherret
2020-09-25refactor: clean timers tests (#7679)Bartek Iwańczuk
2020-08-31fix no-inner-declaration lint rule (#7287)Yusuke Tanaka
2020-08-24feat: update to TypeScript 4.0 (#6514)Kitson Kelly
2020-07-14Use dprint for internal formatting (#6682)David Sherret
2020-07-04Update timers to ignore Date Override (#6552)Kyle June
2020-05-20move js unit tests to cli/tests (#5678)Ryan Dahl