diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2024-02-28 21:35:02 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-28 21:35:02 +0000 |
commit | c9b2139b1e7e1240db792173118b7d54d16c5f73 (patch) | |
tree | 34f3b7a037098d48e4c2258a52d4a664d5f61c9b /tests/integration/publish_tests.rs | |
parent | 918c5e648f4bd08d768374ccde1b451b84793b76 (diff) |
Revert "fix(publish): error if there are uncommitted changes (#22613)" (#22625)
This reverts commit c2c4e745a5db4f2e53aa70bf22b6c828fa1b4040.
Diffstat (limited to 'tests/integration/publish_tests.rs')
-rw-r--r-- | tests/integration/publish_tests.rs | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/tests/integration/publish_tests.rs b/tests/integration/publish_tests.rs index 23db5d7de..fafc018f9 100644 --- a/tests/integration/publish_tests.rs +++ b/tests/integration/publish_tests.rs @@ -1,7 +1,5 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. -use std::process::Command; - use deno_core::serde_json::json; use test_util::assert_contains; use test_util::assert_not_contains; @@ -429,44 +427,3 @@ fn publish_context_builder() -> TestContextBuilder { .envs(env_vars_for_jsr_tests()) .use_temp_cwd() } - -#[test] -fn allow_dirty() { - let context = publish_context_builder().build(); - let temp_dir = context.temp_dir().path(); - temp_dir.join("deno.json").write_json(&json!({ - "name": "@foo/bar", - "version": "1.0.0", - "exports": "./main.ts", - })); - - temp_dir.join("main.ts").write(""); - - let cmd = Command::new("git") - .arg("init") - .arg(temp_dir.as_path()) - .output() - .unwrap(); - assert!(cmd.status.success()); - - let output = context - .new_command() - .arg("publish") - .arg("--token") - .arg("sadfasdf") - .run(); - output.assert_exit_code(1); - let output = output.combined_output(); - assert_contains!(output, "Aborting due to uncomitted changes"); - - let output = context - .new_command() - .arg("publish") - .arg("--allow-dirty") - .arg("--token") - .arg("sadfasdf") - .run(); - output.assert_exit_code(0); - let output = output.combined_output(); - assert_contains!(output, "Successfully published"); -} |