unit-testing
Here are 2,678 public repositories matching this topic...
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
According to your documentation (https://docs.pytest.org/en/latest/xunit_setup.html), I can name a method teardown() in a test class, and it should not get run by pytest. I am using version pytest-3.8.2.
Pytest calls a method called teardown on class destruction even though it is specified as teardown_class in your documentation. I am guessing this accidentally did not get removed, when the na
-
Updated
Jul 9, 2020 - Go
Description
There aren't enough resources on how to use Shadows in tests, or how they work. Some more documentation would really be helpful to understand and use them quicker.
Steps to Reproduce
None
Robolectric & Android Version
Robolectric 4.3
Link to a public git repo demonstrating the problem:
None
Solutions
1. Convert INO files to CPP
2. Manual prototype declaration
#ifdef DO_NOT_USE
typedef int32_t delaytype;
void thisShouldNotAppearInTheBinary(delaytype timer); // aded manually
void thisShouldNotAppearInTheBinary(delaytype timer) {
delay(timer);
}
#endif
What are you trying to achieve?
Let users know that Codeception 3 brings not only PHPUnit 8.x support, but also blazing-fast code coverage via krakjoe/pcov thanks to this bad boy sebastianbergmann/php-code-coverage#663
What do you get instead?
pcov
is not mentioned anywhere
Details
The setup is
This is more of a development problem and does not affect users as it is with dev dependencies. When cloning the repository and running yarn, yarn warns about incorrect peer dependencies:
$ git clone https://github.com/apiaryio/dredd.git dredd-clean
Cloning into 'dredd-clean'...
remote: Enumerating objects: 54, done.
remote: Counting objects: 100% (54/54), done.
remote: Compressin
There is a step Adding Export Configuration (Step 11) in CMake Tutorial.
There seems no related examples about Export Configuration In the repository, could you add one?
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':

{
fixed (char* value = valueArray)
{
Assert.Equal(expected, new string(value, startIndex, length));
Opencover allows hiding skipped modules by providing a `hideskipped parameter. Would be great to add this.
See https://github.com/OpenCover/opencover/wiki/Usage#console-application-usage for details.
AssertJ's AbstractIterableAssert
is large. We don't have an equivalent to every last assertion (and this is sometimes intentional), but for cases in which we do have an equivalent, we could help prospective users / migrating users / users with
Description
When comparing two identical dictionaries which use an object as the key, .Should().BeEquivalentTo()
fails.
If I override .Equals()
then it succeeds, which feels like it goes against the principle of equivalence expectations.
Whilst this may be my misunderstanding of the expectation, the docs don't seem to call this limitation out, so perhaps worth documenting if deemed
-
Updated
Jun 13, 2020 - C#
@Service
export class FooFactory implements ServiceFactory<DatabaseDriver> {
create(): DatabaseDriver {
return new DatabaseDriver()
}
}
@Service
export class UserManager {
constructor(readonly dbDriver: DatabaseDriver) {}
fast-check is a very nice library. It would be even better if we could use it with Facebook's ReasonML instead of Typescript!
It might be possible to use https://github.com/rrdelaney/ReasonablyTyped to make the conversion easier.
-
Updated
Jun 13, 2020 - JavaScript
We currently have --list-browsers
which lists all available browsers, and when you run airtap, it prints which browsers are actually tested:
$ npm run test-browsers
[secure]@5.0.1 test-browsers /home/travis/build/Level/[secure]
standard && airtap --sauce-connect --loopback airtap.local --coverage test/index.js
- testing: chrome @ Windows 10: 79
- testing: firefox @ Windows 10: 7
http://blog.cocoapods.org/CocoaPods-1.7.0-beta/#support-for-multiple-swift-versions
The swift_version DSL that was first introduced in CocoaPods 1.4.0 has now been expanded to support multiple Swift versions. This helps pod authors and gives consumers more flexibility when it comes to choosing which version of Swift to use when consuming a pod.
- Please create a linkage between tab_handling_anchor_links_spec.js and stubbing-spying__window.
Both ar
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
-
Updated
May 17, 2020 - JavaScript
Is your feature request related to a problem? Please describe.
I'm trying to get two containers to communicate with each other.
I can start up each container and connect to it from the command line using localhost and the bound IP but I'm not clear how to get two containers to talk to each other.
I think this would be the equivalent of "docker network connect" https://stackoverflow.com/qu
-
Updated
Jan 15, 2020
Improve this page
Add a description, image, and links to the unit-testing topic page so that developers can more easily learn about it.
Add this topic to your repo
To associate your repository with the unit-testing topic, visit your repo's landing page and select "manage topics."
Spurred by conversation in avajs/ava#2449 and avajs/ava#1485 we'd like for our assertions to return booleans.
true
when they pass,false
when they fail. This does not apply to thethrows()
andthrowsAsync()
assertions.Failing assertions will fail the test, but do not throw exceptions. This means your test does not stop executing. Usua