Option info
The info option provide additionnal context. Instead of generating records, in the form of objects literal or arrays, it generates two properties, info and record. The info property is a snapshot of the info object at the time the record was created. The record property is the actual record.
Note, it can be used conjointly with the raw option.
- Type:
boolean - Optional
- Default:
false - Since: 4.0.0
- Related:
cast,on_record,raw— see Available Options
Example
When the info option is activated with the value true, field is made of the two properties info and record:
If info was false, the assertion would have been:
assert.deepStrictEqual(records, [
[ 'a', 'b', 'c' ]
]);