稳定性: 2 - 稳定

assert 模块提供了一组简单的断言测试,可用于测试不变量。


有关使用的相等性比较的更多信息,参阅 MDN 的指南 - 相等性比较和相同性

Stability: 2 - Stable

The assert module provides a simple set of assertion tests that can be used to test invariants.

A strict and a legacy mode exist, while it is recommended to only use strict mode.

For more information about the used equality comparisons see MDN's guide on equality comparisons and sameness.