Error in mock-functions doc page of pt-br translate.
See original GitHub issue🐛 Bug Report
In line 7 of the second code example in page “https://facebook.github.io/jest/docs/pt-BR/mock-functions.html#propriedade-mock” should be “O segundo argumento da primeira chamada foi ‘second arg’”, because the code goes down from the explanation refers to the first mock call.
Found
// O segundo argumento da segunda chamada foi 'second arg'
expect(someMockFunction.mock.calls[0][1]).toBe('second arg');
Expected
// O segundo argumento da primeira chamada foi 'second arg'
expect(someMockFunction.mock.calls[0][1]).toBe('second arg');
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (3 by maintainers)
Top Results From Across the Web
Mock Functions - Jest
If no implementation is given, the mock function will return undefined when invoked. info. The TypeScript examples from this page will only work ......
Read more >Google Tradutor
O serviço do Google, oferecido sem custo financeiro, traduz instantaneamente palavras, frases e páginas da Web do português para mais de cem outros...
Read more >javascript - 'translate is not a function'-error in react admin with ...
I'm trying to write a test with React Testing Library and Jest. However, I'm getting a TypeError: translate is not a function error....
Read more >Mocking ES and CommonJS modules with jest.mock() - Medium
If the test subject is a standard function then an error of mockFunction is not defined will be returned. This is due to...
Read more >Mock Functions · Jest
Mock functions are also known as "spies", because they let you spy on the behavior of a function that is called indirectly by...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I fixed error in translation, thank you!
Happy to! See https://github.com/facebook/Docusaurus/issues/648