We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5c61c5d commit d93cdf1Copy full SHA for d93cdf1
doc/api/assert.md
@@ -1074,6 +1074,14 @@ assert.strictEqual('Hello foobar', 'Hello World!');
1074
// + 'Hello foobar'
1075
// - 'Hello World!'
1076
// ^
1077
+
1078
+const apples = 1;
1079
+const oranges = 2;
1080
+assert.strictEqual(apples, oranges, `apples ${apples} !== oranges ${oranges}`);
1081
+// AssertionError [ERR_ASSERTION]: apples 1 !== oranges 2
1082
1083
+assert.strictEqual(1, '1', new TypeError('Inputs are not identical'));
1084
+// TypeError: Inputs are not identical
1085
```
1086
1087
If the values are not strictly equal, an `AssertionError` is thrown with a
0 commit comments