Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#31 - Add Test Coverage #107

Merged
merged 13 commits into from
Apr 25, 2020
Merged

#31 - Add Test Coverage #107

merged 13 commits into from
Apr 25, 2020

Commits on Apr 10, 2020

  1. Add: Tests for Help Command

    PS: I hope Bryce sleeps a little better knowing a repository out there in the world is slightly closer to 100% coverage. 🌛
    ctsstc committed Apr 10, 2020
    Configuration menu
    Copy the full SHA
    51fed73 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8a4c561 View commit details
    Browse the repository at this point in the history

Commits on Apr 11, 2020

  1. Edit: SOOOO MUCH REFACTORING

    ## Changes
    - Use Dependency Injection on Commands for CommandClasses
    - Add some real tests for Commands
      - Fully covered! 🎉
    - Core now injects an a client and commands into every command
      - Allows for reuse of commands in help function and other functions of the future :)
    - Commands now take an optional 3rd parameter that includes:
      - client
      - commands
    - Config
      - commandsPathGlob now lives in the config
      - commandTemplateFile has a new home
      - If we decide to later allow for ENV override on these it will be trivial.
      - These could probably be removed if they're only used in one place, but I also enjoy the dependency injection for testing purposes. Even the tests are using the real file paths This test is more like an integration test I think. This is fine.
    - Help command is now more readable and easier to test with dependency injection.
      - Full coverage ;)
    ctsstc committed Apr 11, 2020
    Configuration menu
    Copy the full SHA
    a7e516e View commit details
    Browse the repository at this point in the history
  2. Edit: Changed my mind!

    I decided to remove the following from the config:
    - commandsPathGlob - commandTemplateFile
    
    They are only being used in a single place anyways. I also made sure they'll be easy to extract later if we ever need to inject them.
    ctsstc committed Apr 11, 2020
    Configuration menu
    Copy the full SHA
    7535920 View commit details
    Browse the repository at this point in the history
  3. SR: Fix spelling

    ctsstc committed Apr 11, 2020
    Configuration menu
    Copy the full SHA
    8e02ac0 View commit details
    Browse the repository at this point in the history
  4. SR: Remove unused import

    ctsstc committed Apr 11, 2020
    Configuration menu
    Copy the full SHA
    cce729b View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    ba5626b View commit details
    Browse the repository at this point in the history
  6. SR: Add snapshot for help message

    Also add some padding to match the original.
    
    Now that I can see what it looks like in the snap shot I can easily check :)
    ctsstc committed Apr 11, 2020
    Configuration menu
    Copy the full SHA
    219eb11 View commit details
    Browse the repository at this point in the history
  7. SR: Remove trailing comma

    ctsstc committed Apr 11, 2020
    Configuration menu
    Copy the full SHA
    cb8a998 View commit details
    Browse the repository at this point in the history
  8. PR: Lint autofix

    Seems to just be my stuff.
    I need to get my lint extension running on WSL :0!
    ctsstc committed Apr 11, 2020
    Configuration menu
    Copy the full SHA
    a470b82 View commit details
    Browse the repository at this point in the history
  9. SR: remove unused import

    ctsstc committed Apr 11, 2020
    Configuration menu
    Copy the full SHA
    47d3d36 View commit details
    Browse the repository at this point in the history
  10. SR: Make linter happy

    A larger effort needs to be around this to makes all of these optional since not all commands will utilize all of these in the execute interface.
    ctsstc committed Apr 11, 2020
    Configuration menu
    Copy the full SHA
    ad6e528 View commit details
    Browse the repository at this point in the history

Commits on Apr 20, 2020

  1. Configuration menu
    Copy the full SHA
    086e06d View commit details
    Browse the repository at this point in the history