Skip to content
This repository was archived by the owner on Aug 26, 2022. It is now read-only.
This repository was archived by the owner on Aug 26, 2022. It is now read-only.

Write tests #1

@jack-lewin

Description

@jack-lewin

It would be good to have a few tests to cover basic functionality. I'd prefer to use Mocha or Jest to run the tests - either is fine 👍

Maybe this is a good starting point for tests to write (click to expand)

app.js

  • connect()
    • returns a GitHub API object
    • logs to console.warn if no API key has been provided
  • getIssues()
    • returns a promise
    • resolves with an array in the format [ repo: [ issues ] ]
    • rejects if unsuccessful (maybe we could add some validation to ensure params are received)
  • notify()
    • sends a GET request to the specified URL
  • parseIssue()
    • returns expected values from a GitHub issue object

helpers.js

  • formatTime()
  • timeMinsAgo()
    • get the time (in milliseconds), X minutes ago

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions