egg application. A function is as follows:
function abc(arg) {
assert(typeof arg === "string", "arg should be a string");
// do other thing
// ...
}
if the parameter is of non-string type, the assert statement will be triggered and the console will report an error. In the test case, how to write the console so as not to report an error?
it("should call abc(1) fail", () => {
// how
});