Fix test cases

The test cases failed to execute correctly in my environment for a number of reasons. These changes make it so that the test cases execute successfully and can be launched via `npm test`.