fix bug `test is not defined`