bud icon indicating copy to clipboard operation
bud copied to clipboard

tests: move specs from `tests/unit/**/*` into packages

Open kellymears opened this issue 3 years ago • 0 comments

This is too big a process to hinge on a single PR. We'll take it on piecemeal until tests/unit is empty. Then we'll close this issue.

This PR lays the groundwork: https://github.com/roots/bud/pull/1623.

Tests should:

  • be alongside their corresponding module
  • import code directly from that module
  • be named roughly in accordance with the pattern established in #1623.
    • @roots/bud-api/src/methods/assets/index.ts becomes:
      • @roots/bud-api/src/methods/assets/assets.method.ts
      • @roots/bud-api/src/methods/assets/assets.unit.test.ts

There are about 500 unit tests in the repo, we'll start by tracking progress on @roots/bud-api 😅:

@roots/bud-api

  • [ ] @roots/bud-api/methods/alias
  • [x] @roots/bud-api/methods/assets (#1623)
  • [x] @roots/bud-api/methods/bundle (#1623)
  • [x] @roots/bud-api/methods/config (#1623)
  • [x] @roots/bud-api/methods/define (#1623)
  • [ ] @roots/bud-api/methods/devtool
  • [ ] @roots/bud-api/methods/entry
  • [ ] @roots/bud-api/methods/experiments
  • [ ] @roots/bud-api/methods/externals
  • [ ] @roots/bud-api/methods/hash
  • [ ] @roots/bud-api/methods/minimize
  • [ ] @roots/bud-api/methods/persist
  • [ ] @roots/bud-api/methods/provide
  • [ ] @roots/bud-api/methods/proxy
  • [ ] @roots/bud-api/methods/runtime
  • [x] @roots/bud-api/methods/serve (#1623)
  • [ ] @roots/bud-api/methods/splitChunks
  • [ ] @roots/bud-api/methods/template
  • [ ] @roots/bud-api/methods/use
  • [ ] @roots/bud-api/methods/watch
  • [x] @roots/bud-api/service (#1623)

@roots/bud-server

  • [x] all existing tests (#1606)

kellymears avatar Aug 03 '22 10:08 kellymears