From c9b2139b1e7e1240db792173118b7d54d16c5f73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Wed, 28 Feb 2024 21:35:02 +0000 Subject: Revert "fix(publish): error if there are uncommitted changes (#22613)" (#22625) This reverts commit c2c4e745a5db4f2e53aa70bf22b6c828fa1b4040. --- tests/integration/publish_tests.rs | 43 -------------------------------------- 1 file changed, 43 deletions(-) (limited to 'tests') 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"); -} -- cgit v1.2.3