Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: move more tests away from itest #22909

Merged
merged 19 commits into from
Mar 15, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
c0fd67d
chore: move jsr tests away from itest
dsherret Mar 13, 2024
accd47d
Move types, flags, and jupyter tests
dsherret Mar 14, 2024
c016a12
Merge branch 'main' into chore_move_jsr_tests_away_from_itest
dsherret Mar 14, 2024
0773ab9
fix(node): resolve types via package.json for directory import (#22878)
dsherret Mar 14, 2024
7b4656d
fix(cli): show asserts before leaks (#22904)
mmastrac Mar 14, 2024
22e52b9
fix(cli): unbreak extension example and fix __runtime_js_sources (#22…
mmastrac Mar 14, 2024
6e26304
fix(ext/node): DH (`dhKeyAgreement`) support for `createPrivateKey` …
littledivy Mar 14, 2024
1f759fa
fix: typo in error from GPUBuffer.prototype.mapAsync (#22913)
testwill Mar 14, 2024
f3f28fd
fix(ext/node): crypto.getCipherInfo() (#22916)
littledivy Mar 14, 2024
d8b602d
fix(ext/node): support `spki` format in createPublicKey (#22918)
littledivy Mar 14, 2024
8a2893f
fix(ext/node): Support private EC key signing (#22914)
littledivy Mar 14, 2024
67816fc
chore: Forward 1.41.3 release commit (#22930)
nathanwhit Mar 14, 2024
8c194c3
chore(cli): move away from PathBuf in clap (#22036)
lczerniawski Mar 14, 2024
ef57d37
fix(cli): sanitizer should ignore count of ops started before tests b…
mmastrac Mar 15, 2024
9f04682
fix: handle cache body file not existing when using etag (#22931)
dsherret Mar 15, 2024
8ae7c52
chore(lsp): add tests for compiler options being resolved relative th…
dsherret Mar 15, 2024
dffab05
chore(specs): use jsonc for metadata file (#22946)
dsherret Mar 15, 2024
e46a5b0
Merge branch 'main' into chore_move_jsr_tests_away_from_itest
dsherret Mar 15, 2024
7d84db1
json -> jsonc
dsherret Mar 15, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
100 changes: 0 additions & 100 deletions tests/integration/jsr_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,87 +4,11 @@ use deno_core::serde_json::json;
use deno_core::serde_json::Value;
use deno_lockfile::Lockfile;
use test_util as util;
use test_util::itest;
use url::Url;
use util::assert_contains;
use util::assert_not_contains;
use util::env_vars_for_jsr_npm_tests;
use util::env_vars_for_jsr_tests;
use util::TestContextBuilder;

itest!(no_module_graph_run {
args: "run jsr/no_module_graph/main.ts",
output: "jsr/no_module_graph/main.out",
envs: env_vars_for_jsr_tests(),
http_server: true,
});
Copy link
Member Author

@dsherret dsherret Mar 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nathanwhit it might be a little challenging to move this automatically. We could maybe handle certain situations like where we see something like jsr/node_module_graph/main.out then seeing jsr/node_module_graph/ being used in the args too, Then stripping that from the args and output, moving this to the json, and copying/moving the folder over.


itest!(no_module_graph_info {
args: "info jsr/no_module_graph/main.ts",
output: "jsr/no_module_graph/main_info.out",
envs: env_vars_for_jsr_tests(),
http_server: true,
});

itest!(same_package_multiple_versions {
args: "run --quiet jsr/no_module_graph/multiple.ts",
output: "jsr/no_module_graph/multiple.out",
envs: env_vars_for_jsr_tests(),
http_server: true,
});

itest!(module_graph_run {
args: "run jsr/module_graph/main.ts",
output: "jsr/module_graph/main.out",
envs: env_vars_for_jsr_tests(),
http_server: true,
});

itest!(module_graph_info {
args: "info jsr/module_graph/main.ts",
output: "jsr/module_graph/main_info.out",
envs: env_vars_for_jsr_tests(),
http_server: true,
});

itest!(deps_run {
args: "run jsr/deps/main.ts",
output: "jsr/deps/main.out",
envs: env_vars_for_jsr_tests(),
http_server: true,
});

itest!(deps_info {
args: "info jsr/deps/main.ts",
output: "jsr/deps/main_info.out",
envs: env_vars_for_jsr_tests(),
http_server: true,
});

itest!(import_https_url_analyzable {
args: "run -A jsr/import_https_url/analyzable.ts",
output: "jsr/import_https_url/analyzable.out",
envs: env_vars_for_jsr_tests(),
http_server: true,
exit_code: 1,
});

itest!(import_https_url_unanalyzable {
args: "run -A jsr/import_https_url/unanalyzable.ts",
output: "jsr/import_https_url/unanalyzable.out",
envs: env_vars_for_jsr_tests(),
http_server: true,
exit_code: 1,
});

itest!(subset_type_graph {
args: "check --all jsr/subset_type_graph/main.ts",
output: "jsr/subset_type_graph/main.check.out",
envs: env_vars_for_jsr_tests(),
http_server: true,
exit_code: 1,
});

#[test]
fn fast_check_cache() {
let test_context = TestContextBuilder::for_jsr().use_temp_cwd().build();
Expand Down Expand Up @@ -197,14 +121,6 @@ export function asdf(a: number) { let err: number = ''; return Math.random(); }
);
}

itest!(version_not_found {
args: "run jsr/version_not_found/main.ts",
output: "jsr/version_not_found/main.out",
envs: env_vars_for_jsr_tests(),
http_server: true,
exit_code: 1,
});

#[test]
fn specifiers_in_lockfile() {
let test_context = TestContextBuilder::for_jsr().use_temp_cwd().build();
Expand Down Expand Up @@ -478,19 +394,3 @@ fn set_lockfile_pkg_integrity(
.unwrap()
.integrity = integrity.to_string();
}

itest!(jsx_with_no_pragmas {
args: "run jsr/jsx_with_no_pragmas/main.ts",
output: "jsr/jsx_with_no_pragmas/main.out",
envs: env_vars_for_jsr_npm_tests(),
http_server: true,
exit_code: 1,
});

itest!(jsx_with_pragmas {
args: "run jsr/jsx_with_pragmas/main.ts",
output: "jsr/jsx_with_pragmas/main.out",
envs: env_vars_for_jsr_npm_tests(),
http_server: true,
exit_code: 0,
});
11 changes: 11 additions & 0 deletions tests/specs/jsr/deps/__test__.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"base": "jsr",
"steps": [{
"args": "run main.ts",
"output": "main.out"
}, {
"cleanDenoDir": true,
"args": "info main.ts",
"output": "main_info.out"
}]
}
File renamed without changes.
File renamed without changes.
13 changes: 13 additions & 0 deletions tests/specs/jsr/import_https_url/__test__.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"base": "jsr",
"steps": [{
"args": "run -A analyzable.ts",
"output": "analyzable.out",
"exitCode": 1
}, {
"cleanDenoDir": true,
"args": "run -A nonanalyzable.ts",
"output": "nonanalyzable.out",
"exitCode": 1
}]
}
6 changes: 6 additions & 0 deletions tests/specs/jsr/jsx_with_no_pragmas/__test__.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"base": "jsr",
"args": "run main.ts",
"output": "main.out",
"exitCode": 1
}
5 changes: 5 additions & 0 deletions tests/specs/jsr/jsx_with_pragmas/__test__.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"base": "jsr",
"args": "run main.ts",
"output": "main.out"
}
11 changes: 11 additions & 0 deletions tests/specs/jsr/module_graph/__test__.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"base": "jsr",
"steps": [{
"args": "run main.ts",
"output": "main.out"
}, {
"cleanDenoDir": true,
"args": "info main.ts",
"output": "main_info.out"
}]
}
14 changes: 14 additions & 0 deletions tests/specs/jsr/no_module_graph/__test__.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"base": "jsr",
"steps": [{
"args": "run main.ts",
"output": "main.out"
}, {
"cleanDenoDir": true,
"args": "info main.ts",
"output": "main_info.out"
}, {
"args": "run --quiet multiple.ts",
"output": "multiple.out"
}]
}
6 changes: 6 additions & 0 deletions tests/specs/jsr/subset_type_graph/__test__.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"base": "jsr",
"args": "check --all main.ts",
"output": "main.check.out",
"exitCode": 1
}
6 changes: 6 additions & 0 deletions tests/specs/jsr/version_not_found/__test__.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"base": "jsr",
"args": "run -A main.ts",
"output": "main.out",
"exitCode": 1
}
2 changes: 1 addition & 1 deletion tests/specs/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ fn run_test(test: &Test) {
builder = builder.add_npm_env_vars();
}
"jsr" => {
builder = builder.add_jsr_env_vars();
builder = builder.add_jsr_env_vars().add_npm_env_vars();
}
_ => panic!("Unknown test base: {}", base),
}
Expand Down