diff options
Diffstat (limited to 'tests/integration')
-rw-r--r-- | tests/integration/lint_tests.rs | 42 | ||||
-rw-r--r-- | tests/integration/publish_tests.rs | 16 |
2 files changed, 51 insertions, 7 deletions
diff --git a/tests/integration/lint_tests.rs b/tests/integration/lint_tests.rs index f7c9ead36..ae0414262 100644 --- a/tests/integration/lint_tests.rs +++ b/tests/integration/lint_tests.rs @@ -210,3 +210,45 @@ fn lint_with_glob_config_and_flags() { assert_contains!(output, "Found 2 problems"); 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, +}); diff --git a/tests/integration/publish_tests.rs b/tests/integration/publish_tests.rs index b614005cc..48e62e905 100644 --- a/tests/integration/publish_tests.rs +++ b/tests/integration/publish_tests.rs @@ -22,17 +22,17 @@ itest!(missing_deno_json { exit_code: 1, }); -itest!(invalid_fast_check { +itest!(has_slow_types { args: "publish --token 'sadfasdf'", - output: "publish/invalid_fast_check.out", - cwd: Some("publish/invalid_fast_check"), + output: "publish/has_slow_types.out", + cwd: Some("publish/has_slow_types"), exit_code: 1, }); -itest!(no_zap { - args: "publish --no-zap --token 'sadfasdf'", - output: "publish/no_zap.out", - cwd: Some("publish/invalid_fast_check"), +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, @@ -83,7 +83,9 @@ fn publish_non_exported_files_using_import_map() { .new_command() .args("publish --log-level=debug --token 'sadfasdf'") .run(); + output.assert_exit_code(0); let lines = output.combined_output().split('\n').collect::<Vec<_>>(); + eprintln!("{}", output.combined_output()); assert!(lines .iter() .any(|l| l.contains("Unfurling") && l.ends_with("mod.ts"))); |