I know with sinon.js you can test that a spy was called a certain number of times: sinon.assert.calledTwice(mySpy.someMethod); And you can test that a spy wa
when I try to run my unit tests, I get this error PHP Warning: PHP Startup: Unable to load dynamic library 'bz2' (tried: \xampp\php\ext\bz2 (The specifie
I just want to see the output from a few simple println(...) in my Kotlin mulitplatform commonTest code. My build.gradle.kts looks a little like: import org.je
When I run the ng test on this spec file it fail with this error: Failed: The pipe 'async' could not be found! I have tried to fakesync() the test and still the
The Problem My unit tests on a form break when I refactor an object's member because I can only access the formcontrols on a fromgroup by using bracket notation
I'm trying to test a snippet of my code that uses retrofit, so I've created an interface to "mock" the return, it works in parts, it can invoke the onresponse o
I want to write tests for system that moves entities and detects collisions, system uses Res<Time> to ensure that entities move with constant speed. I was
I have a component and a Pinia store which contains a state and some actions. The code works perfectly fine in browser and in E2E (cypress) tests, but fail on u
I've read through a whole bunch of answers, but still don't understand where I need to mock and/or which class/module to patch and keep getting module does not
hope someone could help me here. while running npm test got following mistake Cannot find module 'react-dom/client' from 'node_modules/@testing-library/react/di
I have a simple service with an Injection token that is used to provide some kind of configuration for the service. It's all working as expected. Although I was
I am trying to unit test my firebase callable cloud function according to the examples provided. See Firebase Example. It boils down to something like this cons
I'm writing unit test. For testing the method below, public async Task<Guid> CreateWebJobStatus(string blobId, Guid loggedInUserId, string loggedInUserE
I am looking to extract a value easily from a method that return a type Either<Exception, Object>. I am doing some tests but unable to test easily the r
I am new to unit testing and just decided to add test coverage for my existing app. I am struggling in writing the unit test cases for the given service . I hav
0 I'm using ngx-translate library and having some issues with unit testing because it wont find certain provides. The issue its that even tho i place a provider
I have create the Custom Test Method attribute. public class CustomTestMethodAttribute : TestMethodAttribute { public CareSourceTestMethodAttribute(string c
I am trying to write a unit test for a function like this: export class newClass { private service: ServiceToMock; constructor () { this.service =
I tried find solution to my issue but didn't find anything. I use: Symfony, Doctrine, PhpUnit I have one entity class InvoiceNumerator: /** * InvoiceNumerat
So far I've got bunch of tests in my multi module project. All of them could be run on PC... except one. It's intrumented test for Room DAO class. There is no p