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 d611f5a commit 3f78a51Copy full SHA for 3f78a51
doc/api/assert.md
@@ -1065,6 +1065,14 @@ assert.strictEqual('Hello foobar', 'Hello World!');
1065
// + 'Hello foobar'
1066
// - 'Hello World!'
1067
// ^
1068
+
1069
+const apples = 1;
1070
+const oranges = 2;
1071
+assert.strictEqual(apples, oranges, `apples ${apples} !== oranges ${oranges}`);
1072
+// AssertionError [ERR_ASSERTION]: apples 1 !== oranges 2
1073
1074
+assert.strictEqual(1, '1', new TypeError('Inputs are not identical'));
1075
+// TypeError: Inputs are not identical
1076
```
1077
1078
If the values are not strictly equal, an `AssertionError` is thrown with a
0 commit comments