Add a helper for testing with various plugin configurations

Open
#79 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
lua, neovim
Domain
testing

Research direction

Start by reading plenary's busted support and the related issue #54. Determine how test cases could declare active plugin dependencies, manage runtimepath, and isolate or clear state. Done means tests for different plugin configurations reliably run with the requested dependencies without affecting one another.

Written by the indexing model from the issue text.

Description

It'd be nice to have a way with plenary's busted support to specify dependencies that test cases have on active plugins.

E.g., imagine a spec file for a function foo which does different things if the user has installed a dependency bar or another dependency baz -- then it'd be nice to have syntax or arguments or etc. which properly manage runtimepath and clearing enough state (or running in enough isolation) such that tests which want to run with bar loaded get that, and tests which want to run with baz loaded get that.

I don't 100% know what a solution to this looks like (though I suppose I'll know that in a few hours after implementing one in a bespoke way for my plugin), but it seems possibly like a thing that'd be more widely useful.

#54 may be related here in a distant way.

Dominant language
Lua
Stars
3.5k
Forks
340
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from nvim-lua/plenary.nvim

All issues in nvim-lua/plenary.nvim

Similar issues

More Lua issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.