use window.TEST_MODE instead of TEST_MODE