Skip to content
On this page

assert-testing

node:assert 模块提供了一组断言验证不变量的功能

严格断言模式

js
import { strict as assert } from 'node:assert';

assert.deepEqual([[[1, 2, 3]], 4, 5], [[[1, 2, '3']], 4, 5]);