Skip to content

Commit

Permalink
Make these tests pending - they have a nasty race condition between
Browse files Browse the repository at this point in the history
them.
  • Loading branch information
CKolkey committed Aug 7, 2023
1 parent 7cc7431 commit 25015d8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/specs/neogit/lib/git/branch_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ local neogit_util = require("neogit.lib.util")
local util = require("tests.util.util")
local input = require("tests.mocks.input")

describe("git branch lib", function()
describe("lib.git.branch", function()
describe("#exists", function()
before_each(function()
git_harness.prepare_repository()
Expand Down Expand Up @@ -88,14 +88,15 @@ describe("git branch lib", function()
]])
end)

it("prompts user for confirmation (yes) and deletes branch", function()
-- These two tests seem to have a race condition where `input.confirmed` isn't set properly
pending("prompts user for confirmation (yes) and deletes branch", function()
input.confirmed = true

assert.True(gb.delete("a-new-branch"))
assert.False(vim.tbl_contains(gb.get_local_branches(true), "a-new-branch"))
end)

it("prompts user for confirmation (no) and doesn't delete branch", function()
pending("prompts user for confirmation (no) and doesn't delete branch", function()
input.confirmed = false

assert.False(gb.delete("a-new-branch"))
Expand Down

0 comments on commit 25015d8

Please sign in to comment.