mock
Here are 1,520 public repositories matching this topic...
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
Nock has two APIs:
- The part that faces the developer writing tests – the public interface
- 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.jswhich are the mockhttp(s).getandhttp(s).requestcalls request_overrider.js, the mock response- `intercept.
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
-
Updated
Jul 6, 2020 - JavaScript
建议添加新功能:同步 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}":
支持 Markdown 定义接口文档
New Issue Checklist
- I have tried with the latest version of OHHTTPStubs
- I have read the README
- I have read the Using the right Swift Version of
OHHTTPStubsfor your project section - I have
Would it be possible for Mockk to support "real partial mocks" (as well as "real partial relaxed mocks", via a feature equivalent to Mockito's thenCallRealMethod() feature.
Expected Behavior
You can create a mock that has all functions mocked except for a specified method, via a DSL "an
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':
, 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
-
Updated
May 11, 2020 - Vue
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
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:How can I mock a url that is used to download a file?
Is it possible to set a file into the body of register_uri?
Provide a mock show page that will allow users to view a mock configuration with a legit layout.
- Use code formatting for body content & script
- Description links should be rendered as link, not as text
At the moment MockIt supports
export const StatusCodes = {
OK: "200",
CREATED: "201",
NO_CONTENT: "204",
BAD_REQUEST: "400",
FORBIDDEN: "401",
INTERNAL_SERVER_ERROR: "500"
};
Might be worth adding some more? https://developer.mozilla.org/en-US/docs/Web/HTTP/Status
If anybody is up for the challenge :)?
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
I think it would be helpful if the partial subs page mentioned the need to add:
<ItemGroup>
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
<_Parameter1>YOUR TEST ASSEMBLY</_Parameter1>
</AssemblyAttribute>
<AssemblyAttribute Include="System.Runtime.CompilerServices.I
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
@nodkz i ask because this project is currently very mixed in this case and we should standardize it with an eslint rule to make it always surrounded or let it removed
-
Updated
May 3, 2020 - Kotlin
From [this comment][3]:
I looked up the YARD docs for a
@paramtag 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 descriptionwhich seems odd. I trawled through the historical YARD documentation, CHANGELOG, and issues and [eventually discovered][2] that although the documented o
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
-
Updated
May 19, 2020 - Go
-
Updated
Nov 11, 2019 - JavaScript
Improve this page
Add a description, image, and links to the mock topic page so that developers can more easily learn about it.
Add this topic to your repo
To associate your repository with the mock topic, visit your repo's landing page and select "manage topics."
在inline-edit-table.vue里边设置自定义的指令 v-el-height-adaptive-table="{bottomOffset: 30}"报错:Failed to resolve directive: el-height-adap