Skip to main content

Questions tagged [stub]

A replacement implementation for objects, methods, or functions in order to remove external dependencies, or the object at the client end of an RPC or RMI invocation.

0 votes
1 answer
58 views

Cypress opens link in new tab regardless removed/changed target

Cypress opens link in new tab, I already tried cy.get("a[class='proof proofLink']").invoke('attr', 'target', '_self').click() so as cy.get("a[class='proof proofLink']").invoke('...
knalepa's user avatar
  • 49
0 votes
1 answer
63 views

Add custom namespace in custom command

I'm trying to create a service class with a custom command. Currently if I run php artisan make:service TestService it will be generated with the namespace App\Services in the Services folder, but if ...
Gabriel Fucci's user avatar
0 votes
0 answers
45 views

Mocking an Ajax Call

I am new to Sinon mocking and trying to test a function so my function is something like, save: function (data) { var x = 10; var y = []; Deferred.when( app.ajax({ ...
Anmol Jaising's user avatar
0 votes
0 answers
21 views

any difference in network interaction between creating and reusing clients each grpc call?

I know channel should be reused. but any differece in nerwork round trip between creating and reusing clients each grpc call ? Code 1: GrpcChannel channel = GrpcChannel.ForAddress("https://...
lcm's user avatar
  • 531
0 votes
0 answers
42 views

Skipping analyzing "mediapipe": module is installed, but missing library stubs or py.typed marker

"Skipping analyzing "mediapipe": module is installed, but missing library stubs or py.typed marker" I installed all the required libraries but the code did not work. python verison ...
goul's user avatar
  • 1
0 votes
0 answers
30 views

How to Properly use Argument Captor on a Spied super class method using Mockito and JDK11

I have a class A: class A extends X { public String execute(Input input) { // Do something here } } Then I have class B: class B extends A { public String execute(Input input) { ...
Anirudh Mergu's user avatar
-1 votes
2 answers
67 views

ModuleNotFoundError: No module named 'stubs.profiler' while import stub files in PyCharm

In Pycharm, I am trying to import stub files(.pyi file) in .py file, but I get error ModuleNotFoundError: No module named 'stubs.profiler'. My file structure is as follows: In profiler.py, I try to ...
user24111774's user avatar
1 vote
0 answers
68 views

How to place stub files in dedicated folder?

Let me explain my issue with an example. I have two Python files, module.py and main.py. # module.py from __future__ import annotations from dataclasses import dataclass, field @dataclass class User: ...
The Ancient Coder's user avatar
0 votes
2 answers
191 views

How to import .pyi files in VSCode?

I am trying to use .pyi stub files in VSCode, and I have the following file structure. . When I try to import a .pyi in .py script, e.g. in Hellomath.py, I use: import stubshome.Hellomath. But I get ...
user24111774's user avatar
2 votes
3 answers
92 views

Force Mockito to return null instead of emtpy list

I have a simple test with mocked Properties class: @RunWith(MockitoJUnitRunner.class) public class MockitoReturnListTest { @Mock Properties myProperties; @Test public void ...
fascynacja's user avatar
  • 2,456
1 vote
1 answer
203 views

Handle cypress new tab with typescript

I am new to Cypress and I am trying to handle the usage of new application tabs. I have a button without a link When clicking on this button, a new tab is opened with a random id in the URL (eg. '/...
QA Testing's user avatar
0 votes
0 answers
41 views

Stub a module which exports a function

I need to replace the function returns by a module. I'm using CommonJS with nodejs 18. index.js const sinon = require("sinon"); const axios = require("axios"); const fs = require(&...
erakis's user avatar
  • 60
0 votes
0 answers
46 views

DEP0001: Unexpected Error: SmartDeviceException - Incompatible version of the RPC stub. [0x80131500] during UWP app deployment to Windows phone

I'm encountering an error while deploying a UWP app to a Windows phone device using Visual Studio. The error message is: DEP0001: Unexpected Error: SmartDeviceException - Incompatible version of the ...
Zolii's user avatar
  • 24
0 votes
1 answer
181 views

spy annotated with mockito @Spy does not initialize @Mock fields

I have a class: @AllArgsConstructor public class QuestionInfoService { QuestionInfoRepository repository; } I would like to create a test where I create a spy for this class: @Spy ...
fascynacja's user avatar
  • 2,456
0 votes
0 answers
36 views

How can I stub a function returned by a function? (TS)

I am trying to stub a function returned by a function component but can't seem to find a correct way... Here is what my module looks like: export function myModule(dependencies): myModuleType { ...
lukej7's user avatar
  • 1

15 30 50 per page
1
2 3 4 5
75