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 34e20b8 commit 3dbebffCopy full SHA for 3dbebff
test/proto.js
@@ -5,6 +5,20 @@ var test = require('tape');
5
6
/* eslint no-proto: 0 */
7
8
+// Not pollution as such, but verify protections working as intended.
9
+test('trailing __proto__ key in dotted option ignored', function (t) {
10
+ var argv = parse(['--a.__proto__', 'IGNORED']);
11
+ t.deepEqual(argv.a, {});
12
+ t.end();
13
+});
14
+
15
16
+test('trailing constructor key in dotted option ignored', function (t) {
17
+ var argv = parse(['--a.constructor', 'IGNORED']);
18
19
20
21
22
test('proto pollution', function (t) {
23
var argv = parse(['--__proto__.x', '123']);
24
t.equal({}.x, undefined);
0 commit comments