Relative Content

Tag Archive for typescriptjestjs

How can I effectively isolate state in Jest?

I want to write my tests using GIVEN, WHEN, THEN. GIVEN sets the initial state (e.g. initializes instances), WHEN changes it (eg calls methods on those instances), THEN asserts the new state (e.g. asserts equality).