Added spec in plain ol' JS for comparison