GithubHelp home page GithubHelp logo

Running package tests about neotest-go HOT 4 CLOSED

nvim-neotest avatar nvim-neotest commented on August 10, 2024 1
Running package tests

from neotest-go.

Comments (4)

jstensland avatar jstensland commented on August 10, 2024 1

Sorry if I'm not clear. I'll try again. Overall, is it possible to run a single package's tests? If you have a folder structure like

pkg1
├── subpkg2
│   ├── file3.go
│   ├── file3_test.go
│   └── export_test.go
├── file1.go
├── file1_test.go
├── file2.go
└── file2_test.go

Is there a neotest command I can run that will run the tests in pkg1/file1_test.go and pkg1/file2_test.go but not those in pkg1/subpkg2/file3_test.go?

Steps to reproduce would be to set up such a structure. Include a failing or broken test in subpkg2, and then try do: require('neotest').run.run("pkg1"). Expected result would be a pass for pkg1, but instead you get failures from subpkg2

It is running both pkg1 tests and subpkg2 tests. See my first comment for the type of final command it ends up running, with the ./... that catches all sub folders.

from neotest-go.

nieomylnieja avatar nieomylnieja commented on August 10, 2024 1

Up. We should stick to the behaviour of go test and not recurse a directory unless a glob pattern is provided.

from neotest-go.

sergii4 avatar sergii4 commented on August 10, 2024

Hi @jstensland, I am not sure I understand the problem. How is related to the plugin? What's steps to reproduce?

from neotest-go.

sergii4 avatar sergii4 commented on August 10, 2024

You are right, folks. I am working on PR

from neotest-go.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.