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 eab3761 commit a306b98Copy full SHA for a306b98
test/test.js
@@ -560,6 +560,21 @@ for (const fn of [uneval, stringify]) {
560
assert.equal(e.path, '.foo.map.get("key")');
561
}
562
});
563
+
564
+ uvu.test(`${fn.name} populates error.path after maps (#64)`, () => {
565
+ try {
566
+ fn({
567
+ map: new Map([['key', 'value']]),
568
+ object: {
569
+ invalid() {}
570
+ }
571
+ });
572
+ } catch (e) {
573
+ assert.equal(e.name, 'DevalueError');
574
+ assert.equal(e.message, 'Cannot stringify a function');
575
+ assert.equal(e.path, '.object.invalid');
576
577
578
579
580
uvu.test('does not create duplicate parameter names', () => {
0 commit comments