Skip to content

With the new Jest integration, Refactor Testrunner

we can get rid of double-check:

  • create our own createTestFolder method (keep the logic of process.on('exit') remove the testFolder)

We need tir to raise the fake apiHub

improve the test server by:

  • adding the ability to replicate the existing environment (existing apps seeds, etc). Might be too hard...
  • or give it the ability to 'build' whatever apps we need on the test server itself so we can replicate all the logic

remove the double-check dependency. it is used to create a temporary folder (we can handle that), delete it at the end (we can also handle that), and it does some wierd stuff that is quite probably hurting us

Find a way to control tir's shutdown when we want to.

it would be nice to be able to have this kind of jest setup:

let testSuitedEndCallback = undefined;
let tr;

beforeAll(() => {
  tr = new TestRunner(...);
  const testSuitedEndCallback = (err, ..args) => console.log...
  tr.installApps(["app1", "app2"...]...)
  tr.run(..., testSuitedEndCallback);
})

afterAll(() => {
  testSuitedEndCallback()
  tr.shutdown()
})

This way we dont have the need to run one fake server per test.

Migrating most the code to ts would be perfect if possible

Edited by Ghost User