Duplicating Node.js `assert` assertions in spec `expect` [closed]
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 3 years ago . As opposed to non-asserted code with custom developer-friendly checks, class Some { constructor(arg) { if (Array.isArray(arg) && arg[0] === 'foo') this.foobar = arg.concat('bar').join(''); else console.error('Bad Some constructor arg'); } } currently tested code is heavily packed