os-js / osjs-dev-meta

OS.js Development Meta Package
3 stars 5 forks source link

Include Jest #24

Open andersevenrud opened 2 years ago

andersevenrud commented 2 years ago

Testing suite belongs in this repo so that it can be locked globally instead of in the CI stages.

Makes it a heck of a lot easier to run tests locally as well, and out of the box.

Probably best to start with @^26 as it is today to ensure all tests run fine. Then upgrade to latest. This way packages with failing tests can just stage their update of this meta library.


Split out from https://github.com/os-js/osjs-client/pull/185#issuecomment-1200320877

It's version locked in the CI because latest Jest seems to trigger some kind of edge case that leaves certain tests hanging. Haven't had time to look into it. Might actually just be a thing in the server codebase come to think of it.

Ideally it should be updated, and then be put into https://github.com/os-js/osjs-dev-meta instead of being in the CI stages.

Tasks

Stage 1

  1. [x] Include Jest 26 as a dependency (make sure it's installed with node 16 or below!)
    1. [x] Update README
  2. [x] Upgrade dev-meta dependency on every package with tests, verify tests
    1. [x] Remove the npm install -g jest from CI if verified

Stage 2

  1. [ ] Upgrade to latest Jest
  2. [ ] Upgrade dev-meta dependency on every package with tests, verify tests again and fix any errors

Related packages

andersevenrud commented 2 years ago

@ajmeese7 I went ahead and performed the Stage 1 changes here (along with releasing all of the recent server and client changes onto npm).