Skip to main content

All Questions

Tagged with
-1 votes
2 answers
47 views

Would it still TDD if I would plan and list (as comment) all test ahead?

Would it still count Tdd when I some kind of start planning before even writing test down? I mean create test files with commented test case names. In that way I could for example anticipate and ...
0 votes
0 answers
18 views

ParameterizedTest JUNIT5 with suspend functions

I'm trying to clean a little bit my code and when testing my datasource I'm repeating a lot the test that returns connection and service error, and I'd like to have a bunch of code that tests ...
-1 votes
1 answer
30 views

XCode tests issue: 'any Protocol' does not conform to expected type 'Protocol' insert 'as! Protocol'

Started adding tests to supplementary objects Tested class code: class TokenAdapter { private let tokenProvider: TokenProviderProtocol! private let session: SessionProtocol! // MARK: - Init ...
0 votes
0 answers
29 views

Django Internationalization test error:Couldn't retrieve redirection page

I wrote a blog project in Django,in some pages i used loginrequierdmixin to make sure user is loged in but in test i got error test: def test_get_profile_unauthenticated(self): response = ...
0 votes
1 answer
28 views

How to test Amazon Athena queries

I have a rather complicated Athena query, which I would like to test on a local machine without connecting to Athena. I specified some mock data for testing purposes, and I was hoping that I could use ...
0 votes
0 answers
12 views

Testing provider in flutter which depends on Firebase

I am trying the following test: @GenerateMocks([Tour]) void main() { group('TripProvider', () { test('add Trip', () async { final mockTrip = MockTour(); TripProvider provider = ...
0 votes
1 answer
2k views

How to mock an emit when testing a child component in Jest (Vue)

I am testing a whole bunch of child components, and I'm running into something that I think is really bad practice. Whenever I hit an emit in a child component, it wants me to import the parent ...
1 vote
0 answers
36 views

How to create more detailed log of unit tests?

The objective will be to be able to generate a document with a more detailed restitution of the tests carried out than what the framework offers; with input data, result data and an explanatory ...
0 votes
1 answer
27 views

Testing Value Objects in DDD, "Implementing Domain Driven Design"

In the book "Implementing Domain Driven Design" of Vaughn Vernon, in the Testing of Value Objects section, the author talks about how we can use just shallow copy instead of deep copy to ...
1 vote
1 answer
52 views

How can I test that the PHP code under test calls the proper method on a trait?

Edit: After reading one of the comments, I realized I misspoke pretty badly in the original post, I've made some edits to clarify. Essentially, I need to check the results but am struggling with that ...
-3 votes
1 answer
38 views

Go: test fails when expected value is the same as got value [closed]

I'm learning to test http endpoints in Go with the httptest library and my test is failingeven though by the result it should pass. The function being tested: func testHandler(w http.ResponseWriter, r ...
2 votes
2 answers
413 views

How to test use of toLocal in Dart

I would like to write a testcase to ensure use of the toLocal function in a Flutter app I am working on as forgetting that has been a reoccuring issue. Note: I am not asking how to test the function, ...
3 votes
2 answers
80 views

Can you test whether a function is actually running Asynchronously?

I'm working on a ASP.NET Web Api project to learn the framework and the testing for it and I was wondering if you could test that Asynchronous methods are actually running Asynchronously (or are they ...
0 votes
1 answer
12k views

getAllByRole - TestingLibraryElementError: Unable to find an accessible element with the role "option"

I am trying to learn how to unit test, and my first test is trying to test a selector dropdown menu. I am using react jest to test. When I try to access the options in the selector I get this error: ...
-1 votes
0 answers
76 views

How to test a server action function?

I have a nextjs server action that uses mssql for node to connect with the database. The following is pizza.actions.ts: export async function get_pizza_id(pizza_name: string) { try { if(!...

15 30 50 per page
1
2 3 4 5
443