test running javascript using `document` to store state