Test lib/reference.js