Simplify static pages test file with 'let' function