-
-
Notifications
You must be signed in to change notification settings - Fork 771
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incomplete and incorrect sandbox documentation #1429
Comments
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Hi, is this issue still relevant? and if so can I work on it? 🧐 |
I think so. And if not, it would be useful to know so that we can close this. That's also helping :-) |
Hi @fatso83, I checked the current version of the master branch (7.5.0) to understand how the sandbox functionality works. Then I went through the list of issues you mentioned, and I noted the following:
To address issues 3, 4 and 5, I'll create an example of how I'm not sure which files to update though, is it enough if I update the file |
See To address your question, update |
Oh alright, I should have checked there 🙈. I'll get working on the example then, thanks for the quick reply! |
When researching sinonjs/sinon-test#57 I found that the documentation for sandboxes was incomplete and somewhat misleading.
Issues found
Incorrect default config
It says the sandbox is configured with the following config per default, which is incorrect:
I do not think there is something called
sinon.defaultConfig
and a quick test will show that there is no server configured per default:References removed fields
sinon.defaultConfig
was removed in Sinon 2. Is still used in the docs.Incomplete list of properties
There is no list of properties one can expose on the sandbox, but a list is given:
One important field that is missing is
sandbox
which will expose the actual sandbox object, along with all of its methods. This is for instance useful when usingsinon-test
and you want to invokesandbox.reset()
.No example of how to use
inject()
or the configinjectInto
The code and set of tests were pretty useful. No other examples exist in the docs. Not even mention of
inject()
Incomplete API description
inject()
is missing from the docsThe text was updated successfully, but these errors were encountered: