Skip to content

Config option to set package.path for require #105

@Derpius

Description

@Derpius

Context

  • In our projects we generally keep all of the sourcecode within a src directory of the package
  • We use luabundler which allows setting the require search path(s)
  • We set this to be within the src directory so we only have to do folder.file and not src.folder.file
  • It would be nice to set this with a Lest config option, although you can just overwrite LUA_PATH
  • Lua's documentation for package.path

Scope

  • Add a new configuration option called requireSearchPaths which should be an array of strings
  • Before running the tests, concatenate these strings with ; per the documentation above
  • Assign the new string to package.path

Acceptance Criteria

  • When running tests without defining requireSearchPaths, package.path is not modified
  • When running tests with requireSearchPaths, package.path is set to those elements concatenated with ;

Metadata

Metadata

Assignees

No one assigned

    Labels

    scope - cliCommand line experience

    Type

    No type

    Projects

    Status

    Ready for dev

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions