I guess any exception makes `expect(...).toThrow()` happy, including dereferencing undefined.