Replaced another set of asserts with custom errors, completely dropped chai as a dependency