Skip to content
#

assertions

Here are 335 public repositories matching this topic...

alexanderkjeldaas
alexanderkjeldaas commented Jan 27, 2020

I have a feeling that most people use async/await in new code, and none of the examples use it.

Also, from browsing random issues, better tests will be written using this structure. For example #543 is caused by not using async/await in tests.

// This passes!
it("should reset", async () => {
        request(app)
            .get("/reset")
            .expect(205);
});
chai
IanKemp
IanKemp commented Jan 16, 2020

The documentation for .above states:

The aliases .gt and .greaterThan can be used interchangeably with .above.

However, for .least:

The alias .gte can be used interchangeably with .least.

To my mind, there should be a .greaterThanOrEqual alias for .least in addition to

phauer
phauer commented Apr 13, 2020

Hi,

first of all, I really like Kotest's matchers and consider to move from AssertJ to them.

But I noticed that AssertJ adds useful line breaks after each element in the failure message of the collection matches. Here is an example:

AssertJ:

assertThat(actualDesigns).containsExactly(
    Design(id = 1, userId = 9, name = "Cat", dateCreated = Instant.ofEpochSecond(151827819
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

fluentassertions
ackginger
ackginger commented Sep 13, 2019

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

joel-costigliola
joel-costigliola commented Oct 19, 2019

Summary

ShouldContainOnly is used in a few places where we know what kind of elements we are dealing with, in this case instead of using the term element we could use a more descriptive name.

Example

Spliterator<?> actual = createSpliterator(SORTED | ORDERED);
spliterators.assertHasOnlyCharacteristics(INFO, actual, DISTINCT, SORTED);

fails with this error

debugtalk
debugtalk commented Feb 12, 2020

Hi,

Sometimes I want to capture the request and response traffic details, in which case I need to set proxy and use Charles. In net/http, we can set the HTTP_PROXY environment variable to achieve this goal, however this does not work in httpexpect.

Is there any way we can proxy httpexpect's traffic?

Thanks.

DanielaValero
DanielaValero commented Mar 17, 2020

Describe the feature you'd like:

Jest-Extended has an assertion named the same as jest-extended's one:

-> https://github.com/jest-community/jest-extended#tobeempty
-> https://github.com/testing-library/jest-dom#tobeempty

When both libs are used in the same project, in my case the version of jest-extended overwrites the one from jest-dom. But this might vary depending on the order use

authorjapps
authorjapps commented Feb 28, 2019

From twitter:
https://twitter.com/bbrannic/status/1077892960426041344

The following repo has a good reporting solution which expects the test-run results in JSON format
https://github.com/damianszczepanik/cucumber-reporting

Zerocode already produces test-run results in JSON format.
Some subset of data from this is used for CSV reporting and some for HTML reporting.

Currently it uses _e

alexjeffburke
alexjeffburke commented Dec 7, 2019

Normally, the "to be truthy" assertion does not take any value as it simply asserts that a subject can be coerced to a boolean true (in the case of "to be falsy" it is coercion to boolean false).

It seems that early on these assertions inherited an optional form where a custom message can be supplied as their argument - this was likely inspired by earlier assertions frameworks (assert on node

atrium
robstoll
robstoll commented Apr 28, 2020

Platform (jvm, js, android): jvm
Extension (none, kotlin 1.3, jdk8): jdk8

Code related feature

expect(ZonedDateTime.now()).isAfter("2020-04-28T12:00Z")

//instead of

expect(ZonedDateTime.now()).isAfter(ZonedDateTime.of(2020,4,28,12,0,0,0, ZoneId.of("Z")))

Following the things you need to do:

atrium-logic:

  • duplicate each method in chronoZonedDateTimeAsserti
tester
petrparolek
petrparolek commented Sep 24, 2019

Example:

$pattern = "sign/in";
$actual = "https://test.dev/sign/in?_fid=j3o0";
\Tester\Assert::match($pattern, $actual);

Current tester output:

Failed: 'https://test.dev/sign/in?_fid=j3o0' should match
       ... 'sign/in' in testAbc()

It would nice something like:

Failed: 'wrong pattern format given.'
Failed: 'https://test.dev/sign/in?_fid=j3o0' should matc
cosmicBboy
cosmicBboy commented Apr 11, 2020

Currently, the SeriesSchema object doesn't validate the index of the schema. The purpose of this task is to extend the __init__ signature of SeriesSchema to take an index argument, which would take a pa.Index or pa.MultiIndex. In the validate / __call__ call, the index should be checked.

Improve this page

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

Learn more

You can’t perform that action at this time.