Skip to content

Road to 100% Coverage #153

@lukewhrit

Description

@lukewhrit

Description

If we ever want Spacebin to be stable and suited for use in production environments, we must ensure builds are reproducible and that code issues are caught before they are pushed to a release. To this end, we want to create unit tests for every aspect of the program that checks and ensures everything works according to the specifications.

This issue contains a list of every part of Spacebin that should be tested, and whether it's currently being tested or not. Our top priority should be the Server (API) functions. We want to make sure that API routes are returning what we want.

Progress

  • Config
    • Loading config
  • Server
    • Config route
    • Create document
      • Creating a document and getting the correct Document in response
      • Creating a document and getting sent to the correct webpage
      • Failing when given bad content
    • Fetch document
      • Fetching a document
      • Fetching a document and getting plain-text
      • Failing on a non-existent document
      • Failing on a bad id
    • Core server
      • Creating a server instance
      • Mounting middleware
      • Registering security headers
      • Mounting static content
      • Mounting route handlers
  • Utility functions
    • Ratelimiter string parser
      • Fail on invalid strings (i.e. too many parts, invalid number syntax, number out of range)
      • Pass on valid strings
    • ID generation
      • Generating a phrase
      • Generating a key
    • Helpers
      • Count lines of a document and convert that into HTML line identifiers
      • Validate body of a create document request
      • Identifying and decoding POST request bodies
      • Writing JSON objects to an HTTP response writer
      • Writing Errors to an HTTP response writer

Metadata

Metadata

Assignees

Labels

💥 bugSomething isn't working

Projects

Status

🐛 Bugs / QOL

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions