adding tests to "Undefined listing fix" pull request

i could not push to the existing PR because it's under @rakyll's own repo, so opening this PR on the org repo, but this is still the same thing as #531