@@LachlanMiller Hello, i rework the solution and now im using Jest, but throw me this error this time :( SyntaxError: Cannot use import statement outside a module 4 | 5 | > 6 | import axios from 'axios' |^ 7 | 8 | export default { 9 | mounted() {
@Lachlan Miller this was really a great tutoria love the way you teach in short and crisp, i have one questions as below I have 2 axios calls which are get , lets say methodA() as one axios and Method B() has another axios get request , i am getting an error when i try to mock below, incase of 2 get requests how do i need to do let fetchDeliveryPrograms = jest.fn(); jest.mock('axios',()=>({ get:() => fetchDeliveryPrograms() }));
I love the way you use Vim :D clear and concise explanations ! Keep up the good works !
thanks!
This video is awesome! i learned alot! Thanks 😁
Thanks!
Thanks for the video. :)
It would be nice if you make live stream when fixing some bugs on Vue.js !
Mmm maybe... never did a life stream before 🤔
Hello
I have the next error in this section. Could you please help me?
ReferenceError: jest is not defined
const mockGet = jest.fn()
| ^
Are you using Jest?
@@LachlanMiller Hello, i rework the solution and now im using Jest, but throw me this error this time :(
SyntaxError: Cannot use import statement outside a module
4 |
5 |
> 6 | import axios from 'axios'
|^
7 |
8 | export default {
9 | mounted() {
@@abrahamsa6464 I think you need babel-jest, that will help process ES modules in Jest.
@Lachlan Miller this was really a great tutoria love the way you teach in short and crisp, i have one questions as below
I have 2 axios calls which are get , lets say methodA() as one axios and Method B() has another axios get request , i am getting an error when i try to mock below, incase of 2 get requests how do i need to do
let fetchDeliveryPrograms = jest.fn();
jest.mock('axios',()=>({
get:() => fetchDeliveryPrograms()
}));