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

Updated tests #684

Draft
wants to merge 23 commits into
base: main-enterprise
Choose a base branch
from
Draft

Updated tests #684

wants to merge 23 commits into from

Commits on Aug 8, 2024

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

Commits on Aug 29, 2024

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

Commits on Sep 17, 2024

  1. remove duplicate errors

    decyjphr committed Sep 17, 2024
    Configuration menu
    Copy the full SHA
    775b7ca View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    87b8a95 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    60f8fd3 View commit details
    Browse the repository at this point in the history

Commits on Oct 5, 2024

  1. add some JSDoc types

    These were added as part of understanding the code, commiting in case they might be useful for others as well.
    Gramatus committed Oct 5, 2024
    Configuration menu
    Copy the full SHA
    336d739 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e826f40 View commit details
    Browse the repository at this point in the history
  3. add missing owner.login property in push.settings.json

    This is what probot actually uses to identify the org, so it should probably be there in the fixture.
    Gramatus committed Oct 5, 2024
    Configuration menu
    Copy the full SHA
    2b90f8b View commit details
    Browse the repository at this point in the history
  4. change sender type in repository.edited.json

    When `sender.type` is bot, the change is skipped. This led to the test checking for changes on this event failing.
    Gramatus committed Oct 5, 2024
    Configuration menu
    Copy the full SHA
    f94f6e4 View commit details
    Browse the repository at this point in the history
  5. use standard probot logger in index.test.js

    This seems to me to be the best way for logs to show up in a useful fashion when running tests.
    Gramatus committed Oct 5, 2024
    Configuration menu
    Copy the full SHA
    520f6e8 View commit details
    Browse the repository at this point in the history
  6. fix index.test.js

    Gramatus committed Oct 5, 2024
    Configuration menu
    Copy the full SHA
    6eff20c View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    585c7da View commit details
    Browse the repository at this point in the history
  8. return data when updating branch protection

    This is needed for the test to be able to check that it was called.
    Gramatus committed Oct 5, 2024
    Configuration menu
    Copy the full SHA
    8bc6886 View commit details
    Browse the repository at this point in the history
  9. fix broken branch test

    Gramatus committed Oct 5, 2024
    Configuration menu
    Copy the full SHA
    489546b View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    0bb2713 View commit details
    Browse the repository at this point in the history
  11. include title in NAME_FIELDS

    Also adds support for ovveriding the filter list in `Diffable.sync`.
    This is needed for milestones to work correctly. However, it should be tested well to ensure it does not break anything else.
    Gramatus committed Oct 5, 2024
    Configuration menu
    Copy the full SHA
    5178080 View commit details
    Browse the repository at this point in the history
  12. fix broken milestones test

    Gramatus committed Oct 5, 2024
    Configuration menu
    Copy the full SHA
    16925d6 View commit details
    Browse the repository at this point in the history
  13. refact: changed to async/await and removed some returns

    I believe this change makes the logic easier to follow, especially not returning data that does not need to be returned.
    Gramatus committed Oct 5, 2024
    Configuration menu
    Copy the full SHA
    996af69 View commit details
    Browse the repository at this point in the history
  14. refact: avoid repeating code in updateRepos

    This change should give the exact same result, except moving the `else`-block within the try/catch (and I don't see why that is bad).
    
    The refactor makes it easier to understand the difference in logic with and without a present `repoConfig` by only having the actual alternate action within the if/else and keeping the bit that always happen outside the if/else.
    Gramatus committed Oct 5, 2024
    Configuration menu
    Copy the full SHA
    cb401ec View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    cac9b84 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    9b0c66b View commit details
    Browse the repository at this point in the history
  17. fix: update eslint ecmaVersion to 13

    Linting failed in deploymentConfig.js due to the static fields. Eslint supports this from ecmaVersion 13.
    Gramatus committed Oct 5, 2024
    Configuration menu
    Copy the full SHA
    444cefe View commit details
    Browse the repository at this point in the history
  18. reapply eslint to tests, still supporting jest

    The full test suite failed because it tried to lint the tests, while the running linter did not do the same. Enabling linting gave errors due to jest having undef stuff, but overriding these files for jest env keeps the linting without these errors.
    Gramatus committed Oct 5, 2024
    Configuration menu
    Copy the full SHA
    b4ea065 View commit details
    Browse the repository at this point in the history