summaryrefslogtreecommitdiff
path: root/cli/tests/integration/coverage_tests.rs
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-12-18fix(coverage): error if no files found (#21615)Bartek Iwańczuk
This commit fixes a panic in `deno coverage` command if the file to be covered doesn't produce any coverage data. Fixes https://github.com/denoland/deno/issues/21580
2023-12-12fix(coverage): rename --pretty to --detailed (#21543)Yoshiya Hinosawa
2023-12-12feat(coverage): add summary reporter (#21535)Yoshiya Hinosawa
2023-12-11fix(coverage): escape source code in html coverage report (#21531)Yoshiya Hinosawa
2023-12-08feat(coverage): add html reporter (#21495)Yoshiya Hinosawa
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-09-11fix: exclude internal JS files from coverage (#20448)Marvin Hagemeister
2023-08-29chore(cli): use NPM_CONFIG_REGISTRY for all tests (#20320)Matt Mastracci
We never want tests to hit the real npm registry because this causes test flakes. In addition, we set a sentinal "unset" value for `NPM_CONFIG_REGISTRY` to ensure that all tests requiring npm go through the test server.
2023-07-26fix(lsp): handle import mapped `node:` specifier (#19956)David Sherret
Closes https://github.com/denoland/vscode_deno/issues/805
2023-06-10chore(tests): test_util - Add `PathRef` (#19450)David Sherret
This adds a new `PathRef` struct to test_util for making it easier to work with paths in test code. I'm going to expand on this more in the future.
2023-06-08chore: Use relative paths for assert imports to avoid test flakes (#19427)Matt Mastracci
Tests occasionally fail if we get a bad gateway attempting to fetch the assertion module
2023-04-19fix(test/coverage): exclude test files (#18748)Levente Kurusa
Fixes: #18454
2023-03-30fix(coverage): ignore files from npm registry (#18457)Geert-Jan Zwiers
Fixes https://github.com/denoland/deno/issues/17664 and part of https://github.com/denoland/deno/issues/18454 by excluding files belonging to npm modules by default in the coverage output.
2023-03-13chore(cli/tests): use test builder in more integration tests (#18031)Geert-Jan Zwiers
2023-03-11chore: typo (#18128)Ikko Eltociear Ashimine
2023-01-27chore: upgrade to Rust 1.67 (#17548)David Sherret
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-01-13tests: move integration tests to a single module (#17380)Bartek Iwańczuk
Effectively reverts changes done in https://github.com/denoland/deno/pull/16816
2022-11-26tests: move integration tests to separate modules (#16816)Bartek Iwańczuk
2022-11-15test: don't use remote std for tests (#16631)Bartek Iwańczuk
2022-08-12fix(coverage): ensure coverage is only collected in certain situations (#15467)David Sherret
2022-05-22fix(coverage): do not report transpiled files with no lines (#14699)Colin Ihrig
This commit omits files from the coverage report that have no lines of code to report coverage for. Fixes: https://github.com/denoland/deno/issues/14683
2022-05-04fix(coverage): exclude .snap files (#14480)Geert-Jan Zwiers
2022-04-01chore(tests): use custom temp dir creation for the tests (#14153)David Sherret
2022-03-22chore: replace `.expect("...")` calls with `.unwrap()` in test code (#14081)David Sherret
2022-01-11fix(coverage): merge coverage ranges (#13334)Bartek Iwańczuk
Covered ranges were not merged and thus it appeared that some lines might be uncovered. To fix this I used "v8-coverage" that takes care of merging the ranges properly. With this change, coverage collected from a file by multiple entrypoints is now correctly calculated. I ended up forking https://github.com/demurgos/v8-coverage and adding "cli/tools/coverage/merge.rs" and "cli/tools/coverage/range_tree.rs".
2022-01-10fix(coverage): don't type check (#13324)Bartek Iwańczuk
This commit changes "deno coverage" command not to type check. Instead of relying on infrastructure for module loading in "deno run"; the code now directly reaches into cache for original and transpiled sources. In case sources are not available the error is returned to the user, suggesting to first run "deno test --coverage" command.
2022-01-07chore: update copyright to 2022 (#13306)Ryan Dahl
Co-authored-by: Erfan Safari <erfanshield@outlook.com>
2021-12-23fix(coverage): use only string byte indexes and 0-indexed line numbers (#13190)David Sherret
2021-08-11chore: move test files to testdata directory (#11601)David Sherret
2021-06-27chore: split up integration_tests.rs into separate files (#11131)David Sherret