Skip to content

Commit 132a04b

Browse files
committed
Use a more future-proof/collision-safe Symbol name
If we find ourselves dealing with two different versions of this package in the same runtime, our only hope of identifying previously-patched and hacked methods is a Symbol that's retrievable with `Symbol.for(...)`. Hopefully that should never happen, however.
1 parent 41c7574 commit 132a04b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ module.exports = (options = {}) => {
3131

3232

3333
/**
34-
* @const {Symbol} OriginalMethod
34+
* @const {Symbol} MochaWhen.OriginalMethod
3535
* @summary Symbol for referencing the original version of a replaced global.
3636
*/
37-
const OriginalMethod = Symbol("OriginalMethod");
37+
const OriginalMethod = Symbol.for("MochaWhen.OriginalMethod");
3838

3939

4040
/**

0 commit comments

Comments
 (0)