remove trailing commas from tests
fix emit test by not using setTimeout