GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Add Tests for Function Exports · Issue #3 · PoshCode/ModuleBuilder

Add Tests for Function Exports #3

New issue
Copy link
New issue
Copy link
Open
Open
Add Tests for Function Exports#3
Copy link
Labels
20 - Enhancement23 - Common tests

Description

@markekraus
markekraus
opened on Apr 14, 2018
Issue body actions

As a ModuleBuilder user
In order to ensure expectations
I need shared tests that validate inputs and outputs


We should create common test cases

  • Test all exported functions came from separate files
  • Test all public functions are properly exported by the module
  • Test only public functions are exported by the module
Reacted by Mikey Lombardi (He/Him), Oliver Lipkau and Joel Bennett

Activity

  1. Jaykul
    added
    20 - Enhancement
    23 - Common tests
    on May 4, 2018
  2. Jaykul commented on May 4, 2018

    @Jaykul
    Jaykul
    on May 4, 2018
    Member
    More actions

    NOTE: these tests need to ship with the module, and shouldn't be confused with the unit tests which also need to verify that this happens in order to prove that our code actually does the right thing.

    Reacted by Mikey Lombardi (He/Him)
  3. kilasuit commented on May 19, 2018

    @kilasuit
    kilasuit
    on May 19, 2018
    Contributor
    More actions

    have a look into https://github.com/PowerShellModules/PesterHelpers/ as there may be some overlaps / enhancements there that can be brought in for this

    Reacted by Joel Bennett
  4. Rick-2CA commented on Jun 15, 2018

    @Rick-2CA
    Rick-2CA
    on Jun 15, 2018
    More actions

    On the chance this goes in the direction you're after I've got some tests written to help ensure the module is loading properly at https://github.com/Rick-2CA/MDSTools/blob/master/Tests/Unit.GenericModule.Tests.ps1. Seems to go in the direction the issue is after. I'd be interested in putting more work into it to better serve the project if the approach is close enough to build off of.

    Reacted by Joel Bennett
  5. lipkau commented on Aug 11, 2018

    @lipkau
    lipkau
    on Aug 11, 2018
    Contributor
    More actions

    I just found this issue and wanted to add my 2 cents.

    I have a lot of functions where I use the manifest's DefaultCommandPrefix.
    So I need to consider a dynamic prefix in the command names. And therefore I wrote my tests like this:
    https://github.com/AtlassianPS/AtlassianPS.Configuration/blob/master/Tests/Project.Tests.ps1#L41-L58

    As far as I can tell (and have tested), this works perfectly on modules that don't use DefaultCommandPrefix.

    Reacted by __
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    20 - Enhancement23 - Common tests

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.