context.assert


新增于: v22.2.0, v20.15.0

包含绑定到 context 的断言方法的对象。这里公开了 node:assert 模块的顶层函数,用于创建测试计划。

\An object containing assertion methods bound to context. The top-level functions from the node:assert module are exposed here for the purpose of creating test plans.

test('test', (t) => {
 t.plan(1);
 t.assert.strictEqual(true, true);
}); 

AltStyle によって変換されたページ (->オリジナル) /