From 0efed0340ec8433638758f7ca0c77cb20a0bfbab Mon Sep 17 00:00:00 2001 From: substack Date: Tue, 10 Mar 2020 08:23:44 -1000 Subject: [PATCH] failing test for protocol pollution --- test/proto.js | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 test/proto.js diff --git a/test/proto.js b/test/proto.js new file mode 100644 index 0000000..015ea60 --- /dev/null +++ b/test/proto.js @@ -0,0 +1,8 @@ +var parse = require('../'); +var test = require('tape'); + +test('proto pollution', function (t) { + var argv = parse(['--__proto__.x','123']); + t.equal({}.x, undefined); + t.end(); +});