Abstract. Unit testing in the presence of side eects requires the construction of a suitable test xture before each test run. We consider the problem of providing test xtures for unit testing of client-side JavaScript code that manipulates its underlying web page. We propose using techniques from software transactional memory to restore the test xture after each test run.