Skip to content
#

stub

Here are 253 public repositories matching this topic...

mikehaertl
mikehaertl commented Oct 30, 2019

When learning how to use mocker I came across this paragraph on this page:

When creating a test double object, we can pass in an identifier as a name for our test double. If we pass it no identifier, the test double name will be unknown. Furthermore, the identifier must not be a class name. It i

sinon
rensbaardman
rensbaardman commented Sep 19, 2019

Describe the bug
When the (string) representations of the expected outcome and the actual outcome of e.g. assert.calledWith() are equal, the resulting error message is very confusing and hinting at a bug in the display logic. Instead of <red>actual</red> <green>expected</green> (with <color>...</color> my attempt at showing the expected terminal output color), it displays `actual

AnthonyMillerSF
AnthonyMillerSF commented Apr 16, 2020

I have a library that I generate all of my mocks into that is imported in my unit tests. When mocking a protocol, the generated mock object doesn't have an initializer declared. This means is uses the default initializer, which would be fine, except the default init() method is internal. I can get around this by importing my mock library @testable, but I'd suggest that protocol mocks for publi

floehopper
floehopper commented Mar 16, 2020

From [this comment][3]:

I looked up the YARD docs for a @param tag and was surprised to see that the order should be: [@param name [Types] description][1]. I noticed that all of the Mocha YARD docs use @param [Types] name description which seems odd. I trawled through the historical YARD documentation, CHANGELOG, and issues and [eventually discovered][2] that although the documented o

garretwilson
garretwilson commented Sep 27, 2017

I see things like Condition.get(String uri) which say that they accept a URI. But the examples show things like get("/demo"), which is not a URI at all --- it's a path. And there's no documentation about encoding at all.

Yes I know that Request.getRequestURI() really returns a path, but that's an old API and it was named badly to begin with. There are so many variations of things that are

RuudVerhoef
RuudVerhoef commented Nov 12, 2019

The following is still part of the readme.md:

Just mock and expects as usual and use chain to expects the chained methods. Finally call resolves or rejects (remember to require sinon-as-promised).

However (going there):
Sinon 2 added resolves and rejects methods and no longer requires this library.

Improve this page

Add a description, image, and links to the stub topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the stub topic, visit your repo's landing page and select "manage topics."

Learn more

You can’t perform that action at this time.