Add test for isValidDescriptor

Fixes #1164.

Test Plan: grunt test
Merge pull request #1394 from spicyj/gh-1164

Add test for isValidDescriptor