using expect instead of chai
is.function -> is.fn, and fixed tests in ie8