w3c/wptserve — pull request #42 by hillbrad (2014-07-22 00:20:16+00:00)
Title: Allow stash overwrites

Attempting to stash the same value twice destroys the current value. This is very unfortunate in the case of using it to record things like CSP reports, where browsers may send multiple reports (e.g. if a policy prevents setInterval()) but the test case only wants to verify that at least one report was sent.

This patch allows setting an optional "overwrite" parameter for stash.put() to allow silently replacing an existing value instead of raising an error.