Skip to content

Commit

Permalink
fix(test): add unit test for set-value pollution
Browse files Browse the repository at this point in the history
  • Loading branch information
Qwerios committed Aug 14, 2020
1 parent 769220b commit ec0b977
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/prototype-pollution.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
chai = require "chai"
objectUtils = require "../lib/utils.js"

describe( "Prototype pollution", () ->
describe( "#setValue()", () ->
it( "Should not pollute value", () ->
objectUtils.setValue( '__proto__.polluted', {}, true )

chai.expect( global.polluted ).to.eql( undefined )
)
)
)

0 comments on commit ec0b977

Please sign in to comment.