Update beforeEach JS snippet.