Example:
describe('jobs-runner', () => {
it('can accept a new job', () => {
system.add({ job: DUMMY });
expect(system.getJobs()).toHaveLength(1);
});
it('can delete a job', () => {
system.delete({ job: DUMMY });
expect(system.getJobs()).toHaveLength(0);
});
});
Regardless of the framework, it's better to make each test self-contained. If you are repeating the same steps a lot, make a helper function and call that. So while multiple tests will have a dependency, you can still run a single test, remove a test without breaking others, etc.
As for 'keeping it fast'... more tests = more time, no matter what you do. If your test suite is getting too big, parallelising execution is probably your next step. Also making sure you're not running all your tests whenever one single test changes.
Birkenstab
I think this should be avoided because
I think unpredictable dependence between chunks of code is generally a rather bad idea.