added page.test.js, renamed function to ensureSingleton.