You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
breaking: Remove sinon.defaultConfig and related modules (#2565)
* breaking: Remove sinon.defaultConfig and related modules
default-config and get-config are leftovers from when Sinon
shipped with sinon.test (now the independent NPM module
'sinon-test').
These serve no purpose internally, and really have no purpose
but to help sinon-test create a base default. If needed,
these can be copied into the sinon-test project. No projects
should depend on these (my assumption), but since it is a
change of the API we mark it as a breaking change
fixes#2561
* fixed up tests that were lying
It seemed like the the 'injectInto' option
would expose most props by default. This was
not the case. That was formerly hidden by
using the getConfig call that added props
that were never used in the actual implementation.
Added another test to make this more explicit.
Will add docs on this.
* Document Sandbox#inject
This was added in Sinon 0.6 but has never been documented
* Note that 'properties' is empty by default
The sandbox's methods can be injected into another object for convenience. The
82
-
`injectInto` configuration option can name an object to add properties to. See the example further down the page.
82
+
`injectInto` configuration option can name an object to add properties to. Note that you explicitly need to specify all the properties you want to expose using the `properties` field.
83
+
84
+
See the example further down the page.
83
85
84
86
##### `properties`
85
87
86
-
Which properties to inject into the facade object. Note that only naming "server" here is not sufficient to have a `server` property show up in the target object, you also have to set `useFakeServer` to `true`.
88
+
Which properties to inject into the facade object. By default empty! Note that only naming "server" here is not sufficient to have a `server` property show up in the target object, you also have to set `useFakeServer` to `true`.
87
89
88
90
The list of properties that can be injected are the ones exposed by the object
0 commit comments