What is the translation of " MOCK FUNCTION " in Romanian?

[mɒk 'fʌŋkʃn]
[mɒk 'fʌŋkʃn]
o funcţie mock
o funcție mock

Examples of using Mock function in English and their translations into Romanian

{-}
  • Colloquial category close
  • Official category close
  • Medicine category close
  • Ecclesiastic category close
  • Ecclesiastic category close
  • Computer category close
  • Programming category close
Foo is a mock function.
Foo este o funcție mock.
The mock function was called at least once.
Funcția mock este apelată de 2 ori.
You can create a mock function with jest. fn().
Puteți crea o funcţie mock cu jest. fn().
Accepts a value that will be returned for one call to the mock function.
Acceptă o valoare ce va fi returnată pentru un singur apel al funcţiei mock.
Using a mock function.
Utilizarea unei funcţii mock.
Accepts a value that will be returned whenever the mock function is called.
Acceptă o valoare ce va fi returnată ori de câte ori se apelează funcţia mock.
The mock function is called twice.
Funcția mock este apelată de 2 ori.
Use. toHaveBeenCalled to ensure that a mock function got called.
Utilizaţi. toHaveBeenCalled pentru a vă asigura că o funcţie mock a fost apelată.
Creates a mock function similar to jest.
Creează o funcţie dublură similar cu jest.
An array that represents all calls that have been made into this mock function.
O listă care reprezintă toate apelurile care au fost făcute la această funcţie mock.
If you have a mock function, you can use.
Dacă aveţi o funcţie mock, puteţi utiliza.
This mocks out setTimeout andother timer functions with mock functions.
Aceasta dublează setTimeout şicelelalte funcţii cronometru cu funcţii mock.
All mock functions have this special.
Toate funcţiile mock au această proprietate specială.
Can be chained so thatsuccessive calls to the mock function return different values.
Poate fi înlănțuită astfel încâtapeluri succesive ale funcţiei mock vor returna valori diferite.
Mock functions are also very effective in code that uses a functional continuation-passing style.
Funcţiile mock sunt, de asemenea, foarte eficiente în codul care utilizează un stil funcțional continuation-passing.
If no implementation is given, the mock function will return undefined when invoked.
În cazul în care nu este specificată o implementare, funcţia mock va returna undefined când este apelată.
An array that contains all the object instances that have been instantiated from this mock function using new.
Un array care conţine toate instanţele obiectelor instanţiate din această funcţie mock, folosind new.
ToHaveBeenCalledWith to ensure that a mock function was called with specific arguments.
ToHaveBeenCalledWith pentru a vă asigura că o funcţie mock a fost apelată cu niște argumente specifice.
For example: A mock function that has been instantiated twice would have the following mock. instances array.
De exemplu: O funcţie mock, care a fost instanţiată de două ori ar avea array-ul mock. instances următor.
ToHaveBeenCalledTimes to ensure that a mock function got called exact number of times.
ToHaveBeenCalledTimes pentru a vă asigura că o funcţie mock a fost apelată de un anumit număr de ori.
Still, there are cases where it's useful to go beyond the ability to specify return values andfull-on replace the implementation of a mock function.
Totuși, există cazuri în care este nevoie sa depășim simpla specificare a valorii returnate şitrebuie să înlocuim complet implementarea funcției mock.
Finally, in order tomake it simpler to assert how mock functions have been called, we have added some custom matcher functions for you.
În cele din urmă,în scopul simplificării aserțiunilor pe funcţii mock, am adăugat unele funcţii personalizate.
Mock functions are also known as"spies", because they let you spy on the behavior of a function that is called indirectly by some other code, rather than just testing the output.
Funcţiile mock sunt, de asemenea, cunoscute și ca"spioni", deoarece acestea vă permit să spionați comportamentul unei funcţii care este apelată indirect de alt cod, decât să testăm doar datele de ieşire.
The mockImplementation method is useful when you need to define the default implementation of a mock function that is created from another module.
Metoda mockImplementation este utilă atunci când aveţi nevoie să definiți implementarea implicită a unei funcţii mock, care este creată într-un alt modul.
To test this function,we can use a mock function, and inspect the mock's state to ensure the callback is invoked as expected.
Pentru a testa această funcţie,putem folosi o funcție mock şi a o inspecta pentru a se asigura că apelul este invocat așa cum ne aşteptăm.
Mock functions make it easy to test the links between code by erasing the actual implementation of a function, capturing calls to the function(and the parameters passed in those calls), capturing instances of constructor functions when instantiated with new, and allowing test-time configuration of return values.
Funcţiile mock sau dubluri facilitează testarea legăturilor din cod prin înlocuirea implementării efective a unei funcţii, captarea apelurilor acelei funcţii(şi parametrii transmiși în aceste apeluri), captarea instanţele funcțiilor constructor atunci când se instanţiază cu new, şi permit configurarea valorilor returnate în teste.
Most real-world examples actually involve getting ahold of a mock function on a dependent component and configuring that, but the technique is the same.
Cele mai multe exemple reale implică de fapt obținerea legăturii funcției mock pe o componentă dependentă şi configurarea ei, dar tehnica este aceeaşi.
For example: A mock function f that has been called twice, with the arguments f('arg1','arg2'), and then with the arguments f('arg3','arg4') would have a mock.
De exemplu: un funcţie mock f, care a fost apelată de două ori, cu argumentele f('arg1', 'arg2'), şi apoi cu argumentele f('arg3', 'arg4') ar avea un array mock..
When you need to recreate a complex behavior of a mock function such that multiple function calls produce different results, use the mockImplementationOnce method.
Atunci când aveţi nevoie să reproduceți un comportament complex al unei funcții mock, astfel încât apelări diferite produc rezultate diferite, utilizaţi metoda mockImplementationOnce.
Determines if the given function is a mocked function.
Determină dacă funcţia pasată este o funcție mock.
Results: 47, Time: 0.0465

Word-for-word translation

Top dictionary queries

English - Romanian