NMF-earth / nmf-app

Understand and reduce your carbon footprint 🌱 iOS & Android.
https://nmf.earth
GNU General Public License v3.0
498 stars 156 forks source link

Fix little bug in a guide script #239

Closed PierreBresson closed 3 years ago

PierreBresson commented 3 years ago

Describe the bug

Remove "personal" path (/Users/pierrebresson/Documents/Git/nmf-app/assets//markdown/) in snapshot file (like it was before). See key in this hot fix

This is a side effect of using ${process.env.PWD} in order to make the script work (see issue #199 )

hb2708 commented 3 years ago

@PierreBresson How can i run the test locally. I tried all from this section but it seems like that is not the one. https://github.com/NMF-earth/nmf-app#-testing

The commands here all the test gets green.

As i think it should fail on all others machine expect urs as the file contains ur local path app/screens/Act/__tests__/__snapshots__/ActScreen.test.tsx.snap

Let me know your thoughts here.

PierreBresson commented 3 years ago

@hb2708 I'm not refering to the tests (snapshots) but to the sutainable guide scripts : node scripts/generate-guides.js

hb2708 commented 3 years ago

Describe the bug

Remove "personal" path (/Users/pierrebresson/Documents/Git/nmf-app/assets//markdown/) in snapshot file (like it was before). See key in this hot fix

This is a side effect of using ${process.env.PWD} in order to make the script work (see issue #199 )

This say the other way around. i thought the change in scripts/generate-guides.js is acceptable. Coz that makes it work on all the machines

PierreBresson commented 3 years ago

@hb2708 yes you can run then and they work but next time someone else than me run the guide script the following path will change : /Users/pierrebresson/Documents/Git/nmf-app/assets//markdown/ it's bad praticse to have this kind of path users/xxx

hb2708 commented 3 years ago

@PierreBresson So I figured the way to regenerate new snapshots. And made some changes to generate-guides.js. Take a look and see if that works for you. I did test locally and testes were green