summaryrefslogtreecommitdiff
path: root/tests/integration
diff options
context:
space:
mode:
Diffstat (limited to 'tests/integration')
-rw-r--r--tests/integration/bench_tests.rs237
-rw-r--r--tests/integration/cache_tests.rs72
-rw-r--r--tests/integration/check_tests.rs31
-rw-r--r--tests/integration/doc_tests.rs15
-rw-r--r--tests/integration/info_tests.rs15
-rw-r--r--tests/integration/lint_tests.rs42
-rw-r--r--tests/integration/publish_tests.rs296
-rw-r--r--tests/integration/run_tests.rs49
-rw-r--r--tests/integration/test_tests.rs21
9 files changed, 27 insertions, 751 deletions
diff --git a/tests/integration/bench_tests.rs b/tests/integration/bench_tests.rs
index 3306a0f96..d588f5b43 100644
--- a/tests/integration/bench_tests.rs
+++ b/tests/integration/bench_tests.rs
@@ -3,223 +3,11 @@
use deno_core::serde_json::json;
use deno_core::url::Url;
use test_util as util;
-use test_util::itest;
-use test_util::itest_flaky;
use util::assert_contains;
use util::assert_not_contains;
-use util::env_vars_for_npm_tests;
use util::TestContext;
use util::TestContextBuilder;
-itest!(overloads {
- args: "bench bench/overloads.ts",
- exit_code: 0,
- output: "bench/overloads.out",
-});
-
-itest!(meta {
- args: "bench bench/meta.ts",
- exit_code: 0,
- output: "bench/meta.out",
-});
-
-itest!(pass {
- args: "bench bench/pass.ts",
- exit_code: 0,
- output: "bench/pass.out",
-});
-
-itest!(ignore {
- args: "bench bench/ignore.ts",
- exit_code: 0,
- output: "bench/ignore.out",
-});
-
-itest!(ignore_permissions {
- args: "bench bench/ignore_permissions.ts",
- exit_code: 0,
- output: "bench/ignore_permissions.out",
-});
-
-itest!(fail {
- args: "bench bench/fail.ts",
- exit_code: 1,
- output: "bench/fail.out",
-});
-
-itest!(bench_formatting {
- args: "bench bench/bench_formatting.ts",
- exit_code: 0,
- output: "bench/bench_formatting.out",
-});
-
-itest!(collect {
- args: "bench --ignore=bench/collect/ignore bench/collect",
- exit_code: 0,
- output: "bench/collect.out",
-});
-
-itest!(load_unload {
- args: "bench bench/load_unload.ts",
- exit_code: 0,
- output: "bench/load_unload.out",
-});
-
-itest!(interval {
- args: "bench bench/interval.ts",
- exit_code: 0,
- output: "bench/interval.out",
-});
-
-itest!(quiet {
- args: "bench --quiet bench/quiet.ts",
- exit_code: 0,
- output: "bench/quiet.out",
-});
-
-itest!(only {
- args: "bench bench/only.ts",
- exit_code: 1,
- output: "bench/only.out",
-});
-
-itest!(multifile_summary {
- args: "bench bench/group_baseline.ts bench/pass.ts bench/multiple_group.ts",
- exit_code: 0,
- output: "bench/multifile_summary.out",
-});
-
-itest!(no_check {
- args: "bench --no-check bench/no_check.ts",
- exit_code: 1,
- output: "bench/no_check.out",
-});
-
-itest!(allow_all {
- args: "bench --allow-all bench/allow_all.ts",
- exit_code: 0,
- output: "bench/allow_all.out",
-});
-
-itest!(allow_none {
- args: "bench bench/allow_none.ts",
- exit_code: 1,
- output: "bench/allow_none.out",
-});
-
-itest!(exit_sanitizer {
- args: "bench bench/exit_sanitizer.ts",
- output: "bench/exit_sanitizer.out",
- exit_code: 1,
-});
-
-itest!(clear_timeout {
- args: "bench bench/clear_timeout.ts",
- exit_code: 0,
- output: "bench/clear_timeout.out",
-});
-
-itest!(finally_timeout {
- args: "bench bench/finally_timeout.ts",
- exit_code: 1,
- output: "bench/finally_timeout.out",
-});
-
-itest!(before_unload_prevent_default {
- args: "bench --quiet bench/before_unload_prevent_default.ts",
- output: "bench/before_unload_prevent_default.out",
-});
-
-itest!(group_baseline {
- args: "bench bench/group_baseline.ts",
- exit_code: 0,
- output: "bench/group_baseline.out",
-});
-
-itest!(unresolved_promise {
- args: "bench bench/unresolved_promise.ts",
- exit_code: 1,
- output: "bench/unresolved_promise.out",
-});
-
-itest!(unhandled_rejection {
- args: "bench bench/unhandled_rejection.ts",
- exit_code: 1,
- output: "bench/unhandled_rejection.out",
-});
-
-itest!(filter {
- args: "bench --filter=foo bench/filter",
- exit_code: 0,
- output: "bench/filter.out",
-});
-
-itest!(no_run {
- args: "bench --no-run bench/no_run.ts",
- output: "bench/no_run.out",
- exit_code: 1,
-});
-
-itest!(no_prompt_by_default {
- args: "bench --quiet bench/no_prompt_by_default.ts",
- exit_code: 1,
- output: "bench/no_prompt_by_default.out",
-});
-
-itest!(no_prompt_with_denied_perms {
- args: "bench --quiet --allow-read bench/no_prompt_with_denied_perms.ts",
- exit_code: 1,
- output: "bench/no_prompt_with_denied_perms.out",
-});
-
-itest!(check_local_by_default {
- args: "bench --quiet bench/check_local_by_default.ts",
- output: "bench/check_local_by_default.out",
- http_server: true,
-});
-
-itest!(check_local_by_default2 {
- args: "bench --quiet bench/check_local_by_default2.ts",
- output: "bench/check_local_by_default2.out",
- http_server: true,
- exit_code: 1,
-});
-
-itest!(bench_explicit_start_end {
- args: "bench --quiet -A bench/explicit_start_and_end.ts",
- output: "bench/explicit_start_and_end.out",
- exit_code: 1,
-});
-
-itest_flaky!(bench_explicit_start_end_low_precision {
- args: "bench --quiet -A bench/explicit_start_and_end_low_precision.ts",
- output: "bench/explicit_start_and_end_low_precision.out",
-});
-
-itest!(bench_with_config {
- args: "bench --config bench/collect/deno.jsonc bench/collect",
- exit_code: 0,
- output: "bench/collect.out",
-});
-
-itest!(bench_with_config2 {
- args: "bench --config bench/collect/deno2.jsonc bench/collect",
- exit_code: 0,
- output: "bench/collect2.out",
-});
-
-itest!(bench_with_malformed_config {
- args: "bench --config bench/collect/deno.malformed.jsonc",
- exit_code: 1,
- output: "bench/collect_with_malformed_config.out",
-});
-
-itest!(json_output {
- args: "bench --json bench/pass.ts",
- exit_code: 0,
- output: "bench/pass.json.out",
-});
-
#[test]
fn recursive_permissions_pledge() {
let context = TestContext::default();
@@ -248,31 +36,6 @@ fn file_protocol() {
.assert_matches_file("bench/file_protocol.out");
}
-itest!(package_json_basic {
- args: "bench",
- output: "package_json/basic/lib.bench.out",
- envs: env_vars_for_npm_tests(),
- http_server: true,
- cwd: Some("package_json/basic"),
- copy_temp_dir: Some("package_json/basic"),
- exit_code: 0,
-});
-
-itest!(bench_lock {
- args: "bench",
- http_server: true,
- cwd: Some("lockfile/basic"),
- exit_code: 10,
- output: "lockfile/basic/fail.out",
-});
-
-itest!(bench_no_lock {
- args: "bench --no-lock",
- http_server: true,
- cwd: Some("lockfile/basic"),
- output: "lockfile/basic/bench.nolock.out",
-});
-
#[test]
fn conditionally_loads_type_graph() {
let context = TestContext::default();
diff --git a/tests/integration/cache_tests.rs b/tests/integration/cache_tests.rs
index ff206c654..5711b0f2e 100644
--- a/tests/integration/cache_tests.rs
+++ b/tests/integration/cache_tests.rs
@@ -1,53 +1,8 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
-use test_util::env_vars_for_npm_tests;
-use test_util::itest;
use test_util::TestContext;
use test_util::TestContextBuilder;
-itest!(_037_fetch_multiple {
- args: "cache --reload --check=all run/fetch/test.ts run/fetch/other.ts",
- http_server: true,
- output: "cache/037_fetch_multiple.out",
-});
-
-itest!(_095_cache_with_bare_import {
- args: "cache cache/095_cache_with_bare_import.ts",
- output: "cache/095_cache_with_bare_import.ts.out",
- exit_code: 1,
-});
-
-itest!(cache_extensionless {
- args: "cache --reload --check=all http://localhost:4545/subdir/no_js_ext",
- output: "cache/cache_extensionless.out",
- http_server: true,
-});
-
-itest!(cache_random_extension {
- args:
- "cache --reload --check=all http://localhost:4545/subdir/no_js_ext@1.0.0",
- output: "cache/cache_random_extension.out",
- http_server: true,
-});
-
-itest!(performance_stats {
- args: "cache --reload --check=all --log-level debug run/002_hello.ts",
- output: "cache/performance_stats.out",
-});
-
-itest!(redirect_cache {
- http_server: true,
- args:
- "cache --reload --check=all http://localhost:4548/subdir/redirects/a.ts",
- output: "cache/redirect_cache.out",
-});
-
-itest!(ignore_require {
- args: "cache --reload --no-check cache/ignore_require.js",
- output_str: Some(""),
- exit_code: 0,
-});
-
// This test only runs on linux, because it hardcodes the XDG_CACHE_HOME env var
// which is only used on linux.
#[cfg(target_os = "linux")]
@@ -71,33 +26,6 @@ fn xdg_cache_home_dir() {
assert!(xdg_cache_home.read_dir().count() > 0);
}
-itest!(check_local_by_default {
- args: "cache --quiet cache/check_local_by_default.ts",
- output: "cache/check_local_by_default.out",
- http_server: true,
-});
-
-itest!(check_local_by_default2 {
- args: "cache --quiet cache/check_local_by_default2.ts",
- output: "cache/check_local_by_default2.out",
- http_server: true,
-});
-
-itest!(json_import {
- // should not error
- args: "cache --quiet cache/json_import/main.ts",
-});
-
-itest!(package_json_basic {
- args: "cache main.ts",
- output: "package_json/basic/main.cache.out",
- envs: env_vars_for_npm_tests(),
- http_server: true,
- cwd: Some("package_json/basic"),
- copy_temp_dir: Some("package_json/basic"),
- exit_code: 0,
-});
-
#[test]
fn cache_matching_package_json_dep_should_not_install_all() {
let context = TestContextBuilder::for_npm().use_temp_cwd().build();
diff --git a/tests/integration/check_tests.rs b/tests/integration/check_tests.rs
index 72fb2d9b7..78ab859f9 100644
--- a/tests/integration/check_tests.rs
+++ b/tests/integration/check_tests.rs
@@ -6,24 +6,6 @@ use util::env_vars_for_npm_tests;
use util::TestContext;
use util::TestContextBuilder;
-itest!(_095_check_with_bare_import {
- args: "check cache/095_cache_with_bare_import.ts",
- output: "cache/095_cache_with_bare_import.ts.out",
- exit_code: 1,
-});
-
-itest!(check_extensionless {
- args: "check --reload http://localhost:4545/subdir/no_js_ext",
- output: "cache/cache_extensionless.out",
- http_server: true,
-});
-
-itest!(check_random_extension {
- args: "check --reload http://localhost:4545/subdir/no_js_ext@1.0.0",
- output: "cache/cache_random_extension.out",
- http_server: true,
-});
-
itest!(check_all {
args: "check --quiet --all check/all/check_all.ts",
output: "check/all/check_all.out",
@@ -145,12 +127,6 @@ itest!(check_imported_files_listed_in_exclude_option {
exit_code: 1,
});
-itest!(check_with_excluded_file_specified {
- args: "check lib/types.d.ts",
- cwd: Some("check/excluded_file_specified/"),
- output: "check/excluded_file_specified/check.out",
-});
-
#[test]
fn cache_switching_config_then_no_config() {
let context = TestContext::default();
@@ -279,13 +255,6 @@ itest!(check_dts {
exit_code: 1,
});
-itest!(check_types_dts {
- args: "check main.ts",
- cwd: Some("check/types_dts/"),
- output: "check/types_dts/main.out",
- exit_code: 0,
-});
-
itest!(package_json_basic {
args: "check main.ts",
output: "package_json/basic/main.check.out",
diff --git a/tests/integration/doc_tests.rs b/tests/integration/doc_tests.rs
index 8ebc46f32..605166ac2 100644
--- a/tests/integration/doc_tests.rs
+++ b/tests/integration/doc_tests.rs
@@ -106,21 +106,6 @@ itest!(deno_doc_invalid_url {
exit_code: 1,
});
-itest!(doc_lock {
- args: "doc main.ts",
- http_server: true,
- cwd: Some("lockfile/basic"),
- exit_code: 10,
- output: "lockfile/basic/fail.out",
-});
-
-itest!(doc_no_lock {
- args: "doc --no-lock main.ts",
- http_server: true,
- cwd: Some("lockfile/basic"),
- output: "lockfile/basic/doc.nolock.out",
-});
-
#[test]
fn deno_doc_html() {
let context = TestContext::default();
diff --git a/tests/integration/info_tests.rs b/tests/integration/info_tests.rs
index 4697cc2b8..a2e3c2d4f 100644
--- a/tests/integration/info_tests.rs
+++ b/tests/integration/info_tests.rs
@@ -100,21 +100,6 @@ itest!(info_missing_module {
output: "info/info_missing_module.out",
});
-itest!(info_lock {
- args: "info main.ts",
- http_server: true,
- cwd: Some("lockfile/basic"),
- exit_code: 10,
- output: "lockfile/basic/fail.out",
-});
-
-itest!(info_no_lock {
- args: "info --no-lock main.ts",
- http_server: true,
- cwd: Some("lockfile/basic"),
- output: "lockfile/basic/info.nolock.out",
-});
-
itest!(info_recursive_modules {
args: "info --quiet info/info_recursive_imports_test.ts",
output: "info/info_recursive_imports_test.out",
diff --git a/tests/integration/lint_tests.rs b/tests/integration/lint_tests.rs
index a55fb1ef4..c0b1b4286 100644
--- a/tests/integration/lint_tests.rs
+++ b/tests/integration/lint_tests.rs
@@ -213,48 +213,6 @@ fn lint_with_glob_config_and_flags() {
assert_contains!(output, "Checked 2 files");
}
-itest!(no_slow_types {
- args: "lint",
- output: "lint/no_slow_types/no_slow_types.out",
- cwd: Some("lint/no_slow_types"),
- exit_code: 1,
-});
-
-itest!(no_slow_types_entrypoint {
- args: "lint a.ts",
- output: "lint/no_slow_types/no_slow_types_entrypoint.out",
- cwd: Some("lint/no_slow_types"),
- exit_code: 1,
-});
-
-itest!(no_slow_types_non_entrypoint {
- args: "lint d.ts",
- output_str: Some("Checked 1 file\n"),
- cwd: Some("lint/no_slow_types"),
- exit_code: 0,
-});
-
-itest!(no_slow_types_excluded {
- args: "lint --rules-exclude=no-slow-types",
- output_str: Some("Checked 4 files\n"),
- cwd: Some("lint/no_slow_types"),
- exit_code: 0,
-});
-
-itest!(no_slow_types_non_package {
- args: "lint --config=deno.non-package.json",
- output_str: Some("Checked 4 files\n"),
- cwd: Some("lint/no_slow_types"),
- exit_code: 0,
-});
-
-itest!(no_slow_types_workspace {
- args: "lint",
- output: "lint/no_slow_types_workspace/output.out",
- cwd: Some("lint/no_slow_types_workspace"),
- exit_code: 1,
-});
-
#[test]
fn opt_out_top_level_exclude_via_lint_unexclude() {
let context = TestContextBuilder::new().use_temp_cwd().build();
diff --git a/tests/integration/publish_tests.rs b/tests/integration/publish_tests.rs
index a033f5d07..26acbd244 100644
--- a/tests/integration/publish_tests.rs
+++ b/tests/integration/publish_tests.rs
@@ -5,81 +5,11 @@ use std::process::Command;
use deno_core::serde_json::json;
use test_util::assert_contains;
use test_util::assert_not_contains;
-use test_util::env_vars_for_jsr_npm_tests;
use test_util::env_vars_for_jsr_provenance_tests;
use test_util::env_vars_for_jsr_tests;
use test_util::env_vars_for_jsr_tests_with_git_check;
-use test_util::env_vars_for_npm_tests;
-use test_util::itest;
use test_util::TestContextBuilder;
-itest!(no_token {
- args: "publish",
- cwd: Some("publish/missing_deno_json"),
- output: "publish/no_token.out",
- envs: env_vars_for_jsr_tests(),
- exit_code: 1,
-});
-
-itest!(missing_deno_json {
- args: "publish --token 'sadfasdf'",
- output: "publish/missing_deno_json.out",
- cwd: Some("publish/missing_deno_json"),
- envs: env_vars_for_jsr_tests(),
- exit_code: 1,
-});
-
-itest!(has_slow_types {
- args: "publish --token 'sadfasdf'",
- output: "publish/has_slow_types.out",
- cwd: Some("publish/has_slow_types"),
- envs: env_vars_for_jsr_tests(),
- exit_code: 1,
-});
-
-itest!(allow_slow_types {
- args: "publish --allow-slow-types --token 'sadfasdf'",
- output: "publish/allow_slow_types.out",
- cwd: Some("publish/has_slow_types"),
- envs: env_vars_for_jsr_tests(),
- http_server: true,
- exit_code: 0,
-});
-
-itest!(invalid_path {
- args: "publish --token 'sadfasdf'",
- output: "publish/invalid_path.out",
- cwd: Some("publish/invalid_path"),
- envs: env_vars_for_jsr_tests(),
- exit_code: 1,
-});
-
-itest!(symlink {
- args: "publish --token 'sadfasdf' --dry-run",
- output: "publish/symlink.out",
- cwd: Some("publish/symlink"),
- envs: env_vars_for_jsr_tests(),
- exit_code: 0,
-});
-
-itest!(invalid_import {
- args: "publish --token 'sadfasdf' --dry-run",
- output: "publish/invalid_import.out",
- cwd: Some("publish/invalid_import"),
- envs: env_vars_for_jsr_npm_tests(),
- exit_code: 1,
- http_server: true,
-});
-
-itest!(invalid_import_esm_sh_suggestion {
- args: "publish --token 'sadfasdf' --dry-run",
- output: "publish/invalid_import_esm_sh_suggestion.out",
- cwd: Some("publish/invalid_import_esm_sh_suggestion"),
- envs: env_vars_for_jsr_npm_tests(),
- exit_code: 1,
- http_server: true,
-});
-
#[test]
fn publish_non_exported_files_using_import_map() {
let context = publish_context_builder().build();
@@ -139,191 +69,19 @@ fn publish_warning_not_in_graph() {
);
}
-itest!(javascript_missing_decl_file {
- args: "publish --token 'sadfasdf'",
- output: "publish/javascript_missing_decl_file.out",
- cwd: Some("publish/javascript_missing_decl_file"),
- envs: env_vars_for_jsr_tests(),
- exit_code: 0,
- http_server: true,
-});
-
-itest!(unanalyzable_dynamic_import {
- args: "publish --token 'sadfasdf'",
- output: "publish/unanalyzable_dynamic_import.out",
- cwd: Some("publish/unanalyzable_dynamic_import"),
- envs: env_vars_for_jsr_tests(),
- exit_code: 0,
- http_server: true,
-});
-
-itest!(javascript_decl_file {
- args: "publish --token 'sadfasdf'",
- output: "publish/javascript_decl_file.out",
- cwd: Some("publish/javascript_decl_file"),
- envs: env_vars_for_jsr_tests(),
- http_server: true,
- exit_code: 0,
-});
-
-itest!(package_json {
- args: "publish --token 'sadfasdf'",
- output: "publish/package_json.out",
- cwd: Some("publish/package_json"),
- envs: env_vars_for_jsr_npm_tests(),
- http_server: true,
-});
-
-itest!(successful {
- args: "publish --token 'sadfasdf'",
- output: "publish/successful.out",
- cwd: Some("publish/successful"),
- envs: env_vars_for_jsr_tests(),
- http_server: true,
-});
-
-itest!(provenance {
- args: "publish",
- output: "publish/successful_provenance.out",
- cwd: Some("publish/successful"),
- envs: env_vars_for_jsr_provenance_tests(),
- http_server: true,
-});
-
-itest!(no_check {
- args: "publish --token 'sadfasdf' --no-check",
- // still type checks the slow types output though
- output: "publish/successful_no_check.out",
- cwd: Some("publish/successful"),
- envs: env_vars_for_jsr_tests(),
- http_server: true,
-});
-
-itest!(node_specifier {
- args: "publish --token 'sadfasdf'",
- output: "publish/node_specifier.out",
- cwd: Some("publish/node_specifier"),
- envs: env_vars_for_jsr_tests()
- .into_iter()
- .chain(env_vars_for_npm_tests().into_iter())
- .collect(),
- http_server: true,
-});
-
-itest!(config_file_jsonc {
- args: "publish --token 'sadfasdf'",
- output: "publish/deno_jsonc.out",
- cwd: Some("publish/deno_jsonc"),
- envs: env_vars_for_jsr_tests(),
- http_server: true,
-});
-
-itest!(workspace_all {
- args: "publish --token 'sadfasdf'",
- output: "publish/workspace.out",
- cwd: Some("publish/workspace"),
- envs: env_vars_for_jsr_tests(),
- http_server: true,
-});
-
-itest!(workspace_individual {
- args: "publish --token 'sadfasdf'",
- output: "publish/workspace_individual.out",
- cwd: Some("publish/workspace/bar"),
- envs: env_vars_for_jsr_tests(),
- http_server: true,
-});
-
-itest!(dry_run {
- args: "publish --token 'sadfasdf' --dry-run",
- cwd: Some("publish/successful"),
- output: "publish/dry_run.out",
- envs: env_vars_for_jsr_tests(),
- http_server: true,
-});
-
-itest!(config_flag {
- args: "publish --token 'sadfasdf' --config=successful/deno.json",
- output: "publish/successful.out",
- cwd: Some("publish"),
- envs: env_vars_for_jsr_tests(),
- http_server: true,
-});
-
-itest!(bare_node_builtins {
- args: "publish --token 'sadfasdf' --dry-run --unstable-bare-node-builtins",
- output: "publish/bare_node_builtins.out",
- cwd: Some("publish/bare_node_builtins"),
- envs: env_vars_for_jsr_npm_tests(),
- http_server: true,
-});
-
-itest!(bare_node_builtins_warning_no_warnings {
- args: "publish --token 'sadfasdf' --dry-run --unstable-bare-node-builtins",
- output: "publish/bare_node_builtins_no_warnings.out",
- cwd: Some("publish/bare_node_builtins"),
- envs: env_vars_for_jsr_npm_tests()
- .into_iter()
- .chain(
- vec![(
- "DENO_DISABLE_PEDANTIC_NODE_WARNINGS".to_string(),
- "1".to_string()
- )]
- .into_iter()
- )
- .collect(),
- http_server: true,
-});
-
-itest!(sloppy_imports {
- args: "publish --token 'sadfasdf' --dry-run --unstable-sloppy-imports",
- output: "publish/sloppy_imports.out",
- cwd: Some("publish/sloppy_imports"),
- envs: env_vars_for_jsr_tests(),
- http_server: true,
-});
-
-itest!(sloppy_imports_not_enabled {
- args: "publish --token 'sadfasdf' --dry-run",
- output: "publish/sloppy_imports_not_enabled.out",
- cwd: Some("publish/sloppy_imports"),
- envs: env_vars_for_jsr_tests(),
- http_server: true,
- exit_code: 1,
-});
-
-itest!(sloppy_imports_no_warnings {
- args: "publish --token 'sadfasdf' --dry-run --unstable-sloppy-imports",
- output: "publish/sloppy_imports_no_warnings.out",
- cwd: Some("publish/sloppy_imports"),
- envs: env_vars_for_jsr_tests()
- .into_iter()
- .chain(
- vec![(
- "DENO_DISABLE_PEDANTIC_NODE_WARNINGS".to_string(),
- "1".to_string()
- )]
- .into_iter()
- )
- .collect(),
- http_server: true,
-});
-
-itest!(jsr_jsonc {
- args: "publish --token 'sadfasdf'",
- cwd: Some("publish/jsr_jsonc"),
- output: "publish/jsr_jsonc/mod.out",
- envs: env_vars_for_jsr_tests(),
- http_server: true,
-});
-
-itest!(unsupported_jsx_tsx {
- args: "publish --token 'sadfasdf'",
- cwd: Some("publish/unsupported_jsx_tsx"),
- output: "publish/unsupported_jsx_tsx/mod.out",
- envs: env_vars_for_jsr_npm_tests(),
- http_server: true,
-});
+#[test]
+fn provenance() {
+ TestContextBuilder::new()
+ .use_http_server()
+ .envs(env_vars_for_jsr_provenance_tests())
+ .cwd("publish/successful")
+ .build()
+ .new_command()
+ .args("publish")
+ .run()
+ .assert_exit_code(0)
+ .assert_matches_file("publish/successful_provenance.out");
+}
#[test]
fn ignores_gitignore() {
@@ -629,20 +387,6 @@ fn not_includes_vendor_dir_only_when_vendor_true() {
}
}
-fn publish_context_builder() -> TestContextBuilder {
- TestContextBuilder::new()
- .use_http_server()
- .envs(env_vars_for_jsr_tests())
- .use_temp_cwd()
-}
-
-fn publish_context_builder_with_git_checks() -> TestContextBuilder {
- TestContextBuilder::new()
- .use_http_server()
- .envs(env_vars_for_jsr_tests_with_git_check())
- .use_temp_cwd()
-}
-
#[test]
fn allow_dirty() {
let context = publish_context_builder_with_git_checks().build();
@@ -739,3 +483,17 @@ fn allow_dirty_dry_run() {
let output = output.combined_output();
assert_contains!(output, "Aborting due to uncommitted changes. Check in source code or run with --allow-dirty");
}
+
+fn publish_context_builder() -> TestContextBuilder {
+ TestContextBuilder::new()
+ .use_http_server()
+ .envs(env_vars_for_jsr_tests())
+ .use_temp_cwd()
+}
+
+fn publish_context_builder_with_git_checks() -> TestContextBuilder {
+ TestContextBuilder::new()
+ .use_http_server()
+ .envs(env_vars_for_jsr_tests_with_git_check())
+ .use_temp_cwd()
+}
diff --git a/tests/integration/run_tests.rs b/tests/integration/run_tests.rs
index eec10f64f..4d9116268 100644
--- a/tests/integration/run_tests.rs
+++ b/tests/integration/run_tests.rs
@@ -3439,17 +3439,6 @@ itest!(config_not_auto_discovered_for_remote_script {
http_server: true,
});
-itest!(package_json_auto_discovered_for_local_script_arg {
- args: "run -L debug -A no_deno_json/main.ts",
- output: "run/with_package_json/no_deno_json/main.out",
- // notice this is not in no_deno_json
- cwd: Some("run/with_package_json/"),
- // prevent creating a node_modules dir in the code directory
- copy_temp_dir: Some("run/with_package_json/"),
- envs: env_vars_for_npm_tests(),
- http_server: true,
-});
-
// In this case we shouldn't discover `package.json` file, because it's in a
// directory that is above the directory containing `deno.json` file.
itest!(
@@ -3464,36 +3453,6 @@ itest!(
}
);
-itest!(package_json_not_auto_discovered_no_config {
- args: "run -L debug -A --no-config noconfig.ts",
- output: "run/with_package_json/no_deno_json/noconfig.out",
- cwd: Some("run/with_package_json/no_deno_json/"),
-});
-
-itest!(package_json_not_auto_discovered_no_npm {
- args: "run -L debug -A --no-npm noconfig.ts",
- output: "run/with_package_json/no_deno_json/noconfig.out",
- cwd: Some("run/with_package_json/no_deno_json/"),
-});
-
-itest!(package_json_not_auto_discovered_env_var {
- args: "run -L debug -A noconfig.ts",
- output: "run/with_package_json/no_deno_json/noconfig.out",
- cwd: Some("run/with_package_json/no_deno_json/"),
- envs: vec![("DENO_NO_PACKAGE_JSON".to_string(), "1".to_string())],
-});
-
-itest!(
- package_json_auto_discovered_node_modules_relative_package_json {
- args: "run -A main.js",
- output: "run/with_package_json/no_deno_json/sub_dir/main.out",
- cwd: Some("run/with_package_json/no_deno_json/sub_dir"),
- copy_temp_dir: Some("run/with_package_json/no_deno_json/"),
- envs: env_vars_for_npm_tests(),
- http_server: true,
- }
-);
-
itest!(package_json_auto_discovered_for_npm_binary {
args: "run -L debug -A npm:@denotest/bin/cli-esm this is a test",
output: "run/with_package_json/npm_binary/main.out",
@@ -3503,14 +3462,6 @@ itest!(package_json_auto_discovered_for_npm_binary {
http_server: true,
});
-itest!(package_json_auto_discovered_no_package_json_imports {
- // this should not use --quiet because we should ensure no package.json install occurs
- args: "run -A no_package_json_imports.ts",
- output: "run/with_package_json/no_deno_json/no_package_json_imports.out",
- cwd: Some("run/with_package_json/no_deno_json"),
- copy_temp_dir: Some("run/with_package_json/no_deno_json"),
-});
-
#[test]
fn package_json_with_deno_json() {
let context = TestContextBuilder::for_npm()
diff --git a/tests/integration/test_tests.rs b/tests/integration/test_tests.rs
index 2bf2b3109..fe9eb83c5 100644
--- a/tests/integration/test_tests.rs
+++ b/tests/integration/test_tests.rs
@@ -584,21 +584,6 @@ itest!(package_json_basic {
exit_code: 0,
});
-itest!(test_lock {
- args: "test",
- http_server: true,
- cwd: Some("lockfile/basic"),
- exit_code: 10,
- output: "lockfile/basic/fail.out",
-});
-
-itest!(test_no_lock {
- args: "test --no-lock",
- http_server: true,
- cwd: Some("lockfile/basic"),
- output: "lockfile/basic/test.nolock.out",
-});
-
itest!(test_replace_timers {
args: "test test/replace_timers.js",
output: "test/replace_timers.js.out",
@@ -676,12 +661,6 @@ fn conditionally_loads_type_graph() {
assert_not_contains!(output.combined_output(), "type_reference.d.ts");
}
-itest!(test_include_relative_pattern_dot_slash {
- args: "test",
- output: "test/relative_pattern_dot_slash/output.out",
- cwd: Some("test/relative_pattern_dot_slash"),
-});
-
#[test]
fn opt_out_top_level_exclude_via_test_unexclude() {
let context = TestContextBuilder::new().use_temp_cwd().build();