Category "testing"

Laravel request()->all() is empty in booted function when running tests

I created a trait sets up some Global Scopes based on the query parameters. It does that by reading from the request() helper and reading the query parameters f

Mocking Bull queues in NestJS

I am trying to test that after sending a request to one of my controllers, the queue pushes a job. Implementation itself works as expected. This is my app.modul

I am unable to click on any element which is inside a frame tag in Test Cafe

I am able to login to my application but after that unable to perform any action because all elements are inside the frame tag. The approaches I have tried: Sel

Rails gem strong_migrations preventing schema from loading

I've recently tried added the strong_migrations gem to my project, but it's preventing me from running any tests because all of the tables in my schema have the

How can I test that Flutter BlocListener navigates and renders an initial Welcome page

I am trying to test that a WelcomePage widget is found when my App is first run and no authentication has yet happened. No matter what I try, I cannot verify th

Facing issue while switching between windows using testcafe

I am able to switch from one window to 2nd window but not able to switch from 2nd window to 3rd window when all windows are open. testcafe not able to open 3rd

rails tutorial Test errors that occur after Chapter 6

I'm a beginner. rails tutorial I got an error like this when I did a rails test after finishing Chapter 6 and before giving it to git. I did an integration test

how can i import main functin of another dart file

How can I verify that a print is called for in dart unit tests? I am writing a sample code for textbooks and want to try it out. There are many examples that us

TypeError: Cannot read property 'uuid' of undefined faker-js faker

I am trying to use faker-js package, but I unexpectedly get a TypeError: Cannot read property 'uuid' of undefined for my variable businessId which try to use fa

Execution failed for task ':vision-camera-code-scanner:checkDebugAndroidTestAarMetadata'

So I have been at this for a while now, I recently tried to add Detox tests to android in my react native projects. I followed the official Detox tutorial and t

Use both enzyme and react-testing-library

So, we started implementing testing in our app, I used enzyme and my coworkers used react-testing-library. Of course the setupTests.js file is different so eith

Python unit testing with unittest module

This is how I wrote the code to start a test with the unittest module but it is returning as 0 tests. Is the return making any problems? (I am able to share the

Different @QuarkusTestResource per Quarkus profile

I have just set up my project to use H2DatabaseTestResource in the tests. I also have created a custom PostgresDatabaseTestResource, following this brilliant bl

Custom Provider: Object literal may only specify known properties, and 'provide' does not exist in type

I'm trying to replace my logger provider in a unit test file with a stubbed provider so that I don't get logs during unit tests from the tested module. I'm gett

Quick Nimble ios test not running

I'm trying to use Quick & Nimble to test a project but the test is never executed. I've created a project from scratch using File->New->Project in Xco

toContainHTML providing an error when HTML element exists (React Testing)

todoElement is supposed to contain a strike element but my test says otherwise. I've declared in my Todo function that if text is completed then it should rende

Field annotated with @Transient being persisted in @DataJpaTest

I'm practicing TDD, So now I'm trying to make a test that will fail for now. About to test a @Entity that don't have a field relationship mapped so far. So I'm

How to add types to Cypress.env?

I have this cypress.json config file: { "env": { "example": "Hello World!" } } In my tests: Cypress.env("example") Can I add any kind of type defintio

Stop the time within the test in Hardhat (Solidity)

Is it possible to stop the time within the test, until the time is changed manually via "evm_increaseTime" in Hardhat? For example when we increase time by 1 se

How to get test coverage percentage on Azure Pipeline?

I have coverlet.collector installed in my project. Then I have added the below into my Yaml file. - task: DotNetCoreCLI@2 inputs: command: test