Comparing version
@@ -0,2 +1,7 @@ | ||
7.2.7 / 2019-03-04 | ||
================== | ||
* Retain spy function names and fix spy.named(name) (#1987) | ||
* Document spying on accessors (#1976) | ||
7.2.6 / 2019-03-01 | ||
@@ -3,0 +8,0 @@ ================== |
@@ -155,2 +155,8 @@ "use strict"; | ||
} | ||
var nameDescriptor = Object.getOwnPropertyDescriptor(func, "name"); | ||
if (nameDescriptor && nameDescriptor.configurable) { | ||
// IE 11 functions don't have a name. | ||
// Safari 9 has names that are not configurable. | ||
Object.defineProperty(p, "name", nameDescriptor); | ||
} | ||
extend.nonEnum(p, { | ||
@@ -336,2 +342,9 @@ isSinonProxy: true, | ||
this.displayName = name; | ||
var nameDescriptor = Object.getOwnPropertyDescriptor(this, "name"); | ||
if (nameDescriptor && nameDescriptor.configurable) { | ||
// IE 11 functions don't have a name. | ||
// Safari 9 has names that are not configurable. | ||
nameDescriptor.value = name; | ||
Object.defineProperty(this, "name", nameDescriptor); | ||
} | ||
return this; | ||
@@ -338,0 +351,0 @@ }, |
{ | ||
"name": "sinon", | ||
"description": "JavaScript test spies, stubs and mocks.", | ||
"version": "7.2.6", | ||
"version": "7.2.7", | ||
"homepage": "https://sinonjs.org/", | ||
@@ -58,4 +58,4 @@ "author": "Christian Johansen", | ||
"dependencies": { | ||
"@sinonjs/commons": "^1.3.0", | ||
"@sinonjs/formatio": "^3.2.0", | ||
"@sinonjs/commons": "^1.3.1", | ||
"@sinonjs/formatio": "^3.2.1", | ||
"@sinonjs/samsam": "^3.2.0", | ||
@@ -62,0 +62,0 @@ "diff": "^3.5.0", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
7055783
0.06%105198
0.06%Updated
Updated