Add some tests for emit failures