unit-testing
Here are 2,559 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
Is it documented anywhere that each test gets their own instance of the class? I was a little shocked when I figured that out.
I also think it would make sense to change the behavior so that every test within a class shared the same instance of the class.
Originally posted by @szegel in pytest-dev/pytest#6890 (comment)
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
-
Updated
May 21, 2020 - Go
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
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':
 in CMake Tutorial.
There seems no related examples about Export Configuration In the repository, could you add one?
I couldn't find this in the documentation or the FAQ: Is it possible to obtain the current test case's name from within that testcase's code? I mean, it should be, but how do we do it? That should be either in the FAQ or in some other relevant documentation file, IMHO.
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.
https://github.com/dotnet/corefx/pull/38701/files#diff-91724393075e1a7718d3521655506742R86
In the following test code:
public static unsafe void Ctor_CharPtr_Int_Int(char[] valueArray, int startIndex, int length, string expected)
{
fixed (char* value = valueArray)
{
Assert.Equal(expected, new string(value, startIndex, length));
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
Apr 26, 2020 - C#
@Service
export class FooFactory implements ServiceFactory<DatabaseDriver> {
create(): DatabaseDriver {
return new DatabaseDriver()
}
}
@Service
export class UserManager {
constructor(readonly dbDriver: DatabaseDriver) {}
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
💡 Idea
constantFrom uses Array.prototype.find, which is not supported on IE11.
Motivation
TinyMCE is a popular open source product and we have switched from jsc to fast-check in the last year. We still support IE11.
-
Updated
May 24, 2020 - JavaScript
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.
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
- Please create a linkage between tab_handling_anchor_links_spec.js and stubbing-spying__window.
Both ar
-
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
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