Skip to content
This repository was archived by the owner on Jul 15, 2023. It is now read-only.
This repository was archived by the owner on Jul 15, 2023. It is now read-only.

go.testFlags are not applied correctly when using the "debug test" code lens #2115

Closed
@segevfiner

Description

@segevfiner

Steps to Reproduce:

  1. Save:

foo_test.go:

package foo

import (
	"flag"
	"testing"
)

var ok = flag.Bool("ok", false, "")

func TestFoo(t *testing.T) {
	if !*ok {
		t.Fail()
	}
}

.vscode/settings.json:

{
    "go.testFlags": ["-ok"]
}
  1. Open foo_test.go and click the "run test" code lens, the test will pass.
  2. Click the "debug test" code lens, the test will fail.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions