Skip to content
#

assertions

Here are 374 public repositories matching this topic...

DarkLite1
DarkLite1 commented Mar 10, 2021

General summary of the issue

Hard to explain, but it took us a complete breakdown of a very complicated script to see what was happening. Please see the test code below.

Describe your environment

Pester version : 5.1.1 C:\Program Files\WindowsPowerShell\Modules\Pester\5.1.1\Pester.psm1
PowerShell version : 5.1.14393.3866
OS version : Microsoft Windows NT 10.0.14393.0

jakubzytka
jakubzytka commented Nov 8, 2018

Summary

When some Throwable-related assertion fails the actual Throwable that failed the check is not described beyond what actually caused assertion failure (e.g. message mismatch). In non trivial code when unexpected Exceptions are thrown this makes debugging inconvenient.

Dumping more comprehensive (class, message, stack, perhaps even recursive info about causes) info about the a

authorjapps
authorjapps commented Aug 5, 2020

As a SDET
I want a documentation or Wiki page where the expected vs actual field matching is explained
So that I can use these in my test automation to test the server response payloads and headers
e.g. id=123 , id="123", isValid=true, isValid="true" etc

AC1:

Cover the following currently supported mechanisms with examples

  • $EQ
  • (int)
  • (float) or (decimal)
  • (boolean)
atrium
robstoll
robstoll commented Oct 27, 2020

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

Code related feature

We also want to provide samples for the infix api

Following the things you need to do:

  • copy CollectionAssertionsSample from fluent-api, adjust imports ...api.fluent... to ...api.infix... and ajdust the samples accordingly (always use the infix syntax, never the fluent).
  • ch
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

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