6 Comments

Hi Gleb, thanks. The lesson was easy, but interesting and useful. I especially like the JSON import idea and the bold in log.

Is it ok if I push your code (solution) from the lesson in my fork of fastify-example-tests?

Expand full comment

I have no problem with that, push it!

Expand full comment

Thank you!

Expand full comment

Hi Gleb, thanks for giving us free access to preview of your course. This is a really good opportunity to test ourselves. Everything in this lesson seemed pretty straightforward just a question why did we use the {} when importing the fixture file? I had initially setup my test without the {} then after watching your solution used the {} and had to make slight modifications to the test to access the fixture data which was actually cleaner approach.

Expand full comment

We had a JSON fixture "{ fruit: apple }", but wanted to use just the field "fruit".

if we want to import the entire file using "import json from '../fixtures/apple.json'" then the variable json would be the object { fruit: apple }. But we wanted just the property "fruit", thus we could import it by name "import { fruit } from '../fixtures/apple.json'" Both ways would import, but if we need just a single property, a named import seems better.

Expand full comment

Thanks for the explanation.

Expand full comment