summaryrefslogtreecommitdiff
path: root/tests/integration/run_tests.rs
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2024-08-30 18:58:58 +0100
committerGitHub <noreply@github.com>2024-08-30 13:58:58 -0400
commitb1c6142f741a507ba6594ab174065e00213100b9 (patch)
treef3dce3e55e4b10b6cf0570dddb6f69340da7a0cf /tests/integration/run_tests.rs
parent4639ae655e9db396fdf4408961db59372334b69b (diff)
BREAKING: `DENO_FUTURE=1` by default, or welcome to Deno 2.0 (#25213)
This commit effectively turns Deno into Deno 2.0. This is done by forcing `DENO_FUTURE=1` env var, that was available in the past few months to try Deno 2 changes. This commit contains several breaking changes scheduled for Deno 2: - all deprecated JavaScript APIs are not available any more, mostly `Deno.*` APIs - `window` global is removed - FFI, WebGPU and FS APIs are now stable and don't require `--unstable-*` flags - import assertions are no longer supported - "bring your own node modules" is enabled by default This is the first commit in a series that are scheduled before the Deno 2 release. Follow up work is tracked in https://github.com/denoland/deno/issues/25241. --------- Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com> Co-authored-by: Nayeem Rahman <nayeemrmn99@gmail.com> Co-authored-by: Nathan Whitaker <nathan@deno.com>
Diffstat (limited to 'tests/integration/run_tests.rs')
-rw-r--r--tests/integration/run_tests.rs88
1 files changed, 50 insertions, 38 deletions
diff --git a/tests/integration/run_tests.rs b/tests/integration/run_tests.rs
index ade5c4560..4d3374173 100644
--- a/tests/integration/run_tests.rs
+++ b/tests/integration/run_tests.rs
@@ -946,7 +946,9 @@ fn lock_redirects() {
);
}
+// TODO(2.0): this should be rewritten to a spec test and first run `deno install`
#[test]
+#[ignore]
fn lock_deno_json_package_json_deps() {
let context = TestContextBuilder::new()
.use_temp_cwd()
@@ -1104,7 +1106,7 @@ fn lock_deno_json_package_json_deps_workspace() {
// deno.json
let deno_json = temp_dir.join("deno.json");
deno_json.write_json(&json!({
- "nodeModulesDir": true
+ "nodeModules": "local-auto"
}));
// package.json
@@ -1801,10 +1803,11 @@ itest!(top_level_for_await_ts {
output: "run/top_level_await/top_level_for_await.out",
});
-itest!(unstable_disabled_js {
- args: "run --reload run/unstable.js",
- output: "run/unstable_disabled_js.out",
-});
+// TODO(2.0): remove, `Deno.umask` is enabled by default with Deno 2.
+// itest!(unstable_disabled_js {
+// args: "run --reload run/unstable.js",
+// output: "run/unstable_disabled_js.out",
+// });
itest!(unstable_enabled_js {
args: "run --quiet --reload --unstable-fs run/unstable.ts",
@@ -1848,25 +1851,29 @@ itest!(unstable_cron_enabled {
output: "run/unstable_cron.enabled.out",
});
-itest!(unstable_ffi_disabled {
- args: "run --quiet --reload --allow-read run/unstable_ffi.js",
- output: "run/unstable_ffi.disabled.out",
-});
+// TODO(2.0): remove, FFI is stable by default with Deno 2.
+// itest!(unstable_ffi_disabled {
+// args: "run --quiet --reload --allow-read run/unstable_ffi.js",
+// output: "run/unstable_ffi.disabled.out",
+// });
-itest!(unstable_ffi_enabled {
- args: "run --quiet --reload --allow-read --unstable-ffi run/unstable_ffi.js",
- output: "run/unstable_ffi.enabled.out",
-});
+// TODO(2.0): remove, FFI is stable by default with Deno 2.
+// itest!(unstable_ffi_enabled {
+// args: "run --quiet --reload --allow-read --unstable-ffi run/unstable_ffi.js",
+// output: "run/unstable_ffi.enabled.out",
+// });
-itest!(unstable_fs_disabled {
- args: "run --quiet --reload --allow-read run/unstable_fs.js",
- output: "run/unstable_fs.disabled.out",
-});
+// TODO(2.0): remove, FS APIs are stable by default with Deno 2.
+// itest!(unstable_fs_disabled {
+// args: "run --quiet --reload --allow-read run/unstable_fs.js",
+// output: "run/unstable_fs.disabled.out",
+// });
-itest!(unstable_fs_enabled {
- args: "run --quiet --reload --allow-read --unstable-fs run/unstable_fs.js",
- output: "run/unstable_fs.enabled.out",
-});
+// TODO(2.0): remove, FS APIs are stable by default with Deno 2.
+// itest!(unstable_fs_enabled {
+// args: "run --quiet --reload --allow-read --unstable-fs run/unstable_fs.js",
+// output: "run/unstable_fs.enabled.out",
+// });
itest!(unstable_http_disabled {
args: "run --quiet --reload --allow-read run/unstable_http.js",
@@ -1899,16 +1906,18 @@ itest!(unstable_kv_enabled {
output: "run/unstable_kv.enabled.out",
});
-itest!(unstable_webgpu_disabled {
- args: "run --quiet --reload --allow-read run/unstable_webgpu.js",
- output: "run/unstable_webgpu.disabled.out",
-});
+// TODO(2.0): remove, WebGPU is enabled by default with Deno 2.
+// itest!(unstable_webgpu_disabled {
+// args: "run --quiet --reload --allow-read run/unstable_webgpu.js",
+// output: "run/unstable_webgpu.disabled.out",
+// });
-itest!(unstable_webgpu_enabled {
- args:
- "run --quiet --reload --allow-read --unstable-webgpu run/unstable_webgpu.js",
- output: "run/unstable_webgpu.enabled.out",
-});
+// TODO(2.0): remove, WebGPU is enabled by default with Deno 2.
+// itest!(unstable_webgpu_enabled {
+// args:
+// "run --quiet --reload --allow-read --unstable-webgpu run/unstable_webgpu.js",
+// output: "run/unstable_webgpu.enabled.out",
+// });
itest!(import_compression {
args: "run --quiet --reload --allow-net run/import_compression/main.ts",
@@ -3433,16 +3442,19 @@ itest!(
}
);
-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",
- cwd: Some("run/with_package_json/npm_binary/"),
- copy_temp_dir: Some("run/with_package_json/"),
- envs: env_vars_for_npm_tests(),
- http_server: true,
-});
+// TODO(2.0): this should be rewritten to a spec test and first run `deno install`
+// 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",
+// cwd: Some("run/with_package_json/npm_binary/"),
+// copy_temp_dir: Some("run/with_package_json/"),
+// envs: env_vars_for_npm_tests(),
+// http_server: true,
+// });
+// TODO(2.0): this should be rewritten to a spec test and first run `deno install`
#[test]
+#[ignore]
fn package_json_with_deno_json() {
let context = TestContextBuilder::for_npm()
.use_copy_temp_dir("package_json/deno_json/")