test: fix syntax, remove globals