Add tests before anyone touches old code

Adds tests that record how old code behaves today, before anyone reworks it.

What you ask

Search Acme

billing

2
  1. Fabian

    @devboxes we're about to rework the dunning schedule. can you add tests for how it behaves today first, and keep the code as it is?

  2. devboxes APP

    #60 adds 14 tests for the dunning schedule, covering weekend due dates, the grace period, paused subscriptions and the final notice. Only tests changed, and they all pass.

    Opened #60

What devboxes does

  1. Read the code and its callers

    • devboxes reads the code, everything that calls it and the tests it already has.
  2. List today's behavior

    • Then it writes down how the code behaves today, as inputs and the results they give.
  3. Add the tests

    • The new tests pass against the code as it is today.
    • Only test files change, so the code itself stays exactly as it was.
  4. Verify

    1. Install dependencies

    2. Test

    3. Lint

    4. If it fails

      1. Fix

        • The tests pass.
      2. Test again

      3. Lint again

  5. Publish

  6. Review

What you get back

acme / ledger

Cover the dunning schedule with tests #60

Open

devboxes[bot] wants to merge 1 commit into main from devboxes/dunning-schedule-tests

devboxes Bot reviewed 2 minutes ago View reviewed changes

devboxes Bot left a comment Author

Tests only. All 14 pass against today's code.

All checks have passed

3 successful checks

  • CI / Lint (pull_request) Details
  • CI / Typecheck (pull_request) Details
  • CI / Tests (pull_request) Details

This branch has no conflicts with the base branch

Merging can be performed automatically.

You can also merge this with the command line.

Files changed 1

  • test/dunning-schedule.test.ts +212 −0

Good for

Startups

More tasks to ship from issues

Ask devboxes to add tests before anyone touches old code

Get started for free