Tests: Fix error and add `test/global.js`