Giter VIP home page Giter VIP logo

sinon-docs's Introduction

sinon-docs's People

Contributors

alexmuller avatar cjohansen avatar ducin avatar fatso83 avatar freethejazz avatar gcheung55 avatar grassator avatar mantoni avatar mroderick avatar radioactivemouse avatar spinningarrow avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

sinon-docs's Issues

How to set Payload in the Fake Server request

Hi,

I have a scenario where with the same url and different RequestPayload the Response will be different. Is there a way to set the Request payload with sinon fakeserver?

           this.server.respondWith("POST", "/url", [
              200,
              { "Content-Type": "application/json" },
                 JSON.stringify([{"key":"value",....}
              ])
            ])

I tried it in different ways without success. Can you please help me.

Document sinon.logError

I can't find any documentation for how to use logError.

It would be great if someone could contribute some documentation for this feature

Errors in README concerning midje

When I created a PR recently I really tried doing "the right thing" by following the docs instructions, so I forked the project, cloned it, changed what was needed, and then tried running the tests. But that part did not work. I just get a 'midje' is not a task. See 'lein help'.

So I am guessing there is a step in the README missing on how to install midje, but as I built the site and visually inspected that the fix was working, I am not looking into that, as Clojure infrastructure is not my forte.

Pass a spyCall to sinon.assert.calledXXX functions

I found that it works fine to pass a spyCall object to Sinon.assert.calledWith() even it's not documented like this.
e.a. Sinon.assert.calledWith(stub.getCall(0), value)

I have the feeling that this is intended and therefore I think it should be documented also.
Am I right here or is this just working "per accident"?

Update for fakeServer.create

I have created a PR which adds the possibility to setup a fakerServer instance by passing an object literal. I'm adding the text for the below update in case someone want to pickup the ball since it might take me some time to get Statis running since I have 0 experience with closure.

server.autoRespond docs are unclear

These are not nearly as specific as the request.autoRespond docs, which explicitly mention the timeout and that it isn't suitable for using in test cases.

Add current release to Downloads page

It took me by complete surprise that the current release isn't on the downloads page at all. It called into question what the server/ie releases were.

Confusing: "Overrides `obj.method` with a mock function and returns it"

The description here confuses me: "Overrides obj.method with a mock function and returns it."

It appears to say that sinon.mock(obj).expects("method") returns the same function as the one that is put in place at obj.method, while what is returned sports the expectation interface and the replacement function doesn't.

Related: as far as I can reproduce, the jQuery.ajax.verify() call as mentioned here will not work as verify won't exist. (Am I missing something?)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.