Skip to content
#

mock

Here are 1,520 public repositories matching this topic...

maald
maald commented Apr 24, 2020

As a new end user, I cannot find a single user guide or decent documentation. The javadoc reads like it's written as a quick review for someone who already knows the ins/outs of Mockito and just need some sample code. I don't even know what or how Mockito works and the first couple of lines are talking about "mockito inline".

Most open source projects have really great user guides and document

paulmelnikow
paulmelnikow commented Jul 8, 2019

Nock has two APIs:

  1. The part that faces the developer writing tests – the public interface
  2. The part that faces the HTTP client library –  the mock surface, for lack of a better name

The mock surface is implemented in a few places:

  • A couple functions in common.js which are the mock http(s).get and http(s).request calls
  • request_overrider.js, the mock response
  • `intercept.
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

simicn
simicn commented Jul 19, 2019

建议添加新功能:同步 Swagger 文档时直接从 Swagger 文档解析 Mock 数据模版定义。

如以下 Swagger 的 id 字段声明

"Account": {
    "type": "object",
    "properties": {
        "id": {
            "type": "integer",
            "x-mock-key": "1",
            "x-mock-value": "[1,2,3]"
        }
    }
}

解析后生成

"id|1": [1, 2, 3]

即解析文档中 properties 的 x-mock-key 和 x-mock-value 为

"id|{x-mock-key}": 
mockk
GalNoga
GalNoga commented Mar 12, 2019

when upgrading to mocha >3 rewire ruins the code coverge generate by nyc. all works well without using rewire..
node version: 10.15.2
rewire: 4.0.1
nyc: 13.3.0
mocha: works with '3.5.3', fail with ^4,^5,^6
OS: windows, Darwin
command: "nyc --reporter=html --reporter=text ./node_modules/.bin/mocha "./*.spec.js" --timeout=3000"

works with mocha '3.5.3':
![good](https://user-images.github

nohwnd
nohwnd commented Jul 2, 2019

It would be nice to start building Pester on PowerShell 7 as well to see if it is compatible and keep it that way. To achieve that we need to research on which build servers v7 is already available. Right now we are building on TravisCI (Linux and MacOS), on AppVeyor (PowerShell 4+) and AzureDevOps (PowerShell 2&3).

Not sure if the build task needs to run on all three platforms, but it would be

mockoon
peawyoyoyin
peawyoyoyin commented Jul 23, 2019

Is your feature request related to a problem? Please describe.
I'm using Mockoon to test an HTTP client that sends a large JSON payload in the request body. Sometimes I want to verify some data sent in the request using the environment log. Currently it is a little bit frustrating without a text search function (I have to manually read through the text).

*Describe the solution you'd like

IvanGoncharov
IvanGoncharov commented Sep 14, 2017

Reported by @sepehr500 in #25

Currently, if want to fake a string, I do the following

type CourtCase {
  jurisdiction: String @examples(values: ["DFT", "FUR"])
}

This makes the think that values expects it's value to be an array of whatever the property type is. So it would follow, that if the type was the following,

type CourtCase {
  jurisdiction:
Mocky
moniuch
moniuch commented Apr 25, 2017

I would welcome a feature when, at the same url which is set to respond with OK status, I could have an error response generated with a random seed.

I am developing an Observable pattern to perform a series of retries to call an endpoint, with increasing delay. The problem is that during testing, I cannot really mock up the condition by randomly switching between two mocky.io urls (error and ok

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

shlomiassaf
shlomiassaf commented Feb 16, 2018

Environment

  • Browser: Chrome
  • Version of service-mocker: 2.1.2

Expected Behavior

The hash of a URL should not be part of the url when processing.

Current Behavior

Hash is a part of the url when processing.

When browsers send an HTTP request they omit the hash part of the URL.
It appears that the fetch event sends the Request object with the url as is, no modificati

Improve this page

Add a description, image, and links to the mock 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 mock topic, visit your repo's landing page and select "manage topics."

Learn more

You can’t perform that action at this time.