joolfe / postman-to-openapi

🛸 Convert postman collection to OpenAPI
MIT License
575 stars 99 forks source link

refactor: create folder when writing output #214

Closed fzn0x closed 1 year ago

fzn0x commented 1 year ago

This PR fix [Error: ENOENT: no such file or directory, open 'D:\Projects\postman-to-markdown\api\collection.yml'] when the folder is not exist.

joolfe commented 1 year ago

hi @fzn0x, first of all thanks for the PR but please add some test if you want the PR to be evaluated.

Thanks!

fzn0x commented 1 year ago

hi @fzn0x, first of all thanks for the PR but please add some test if you want the PR to be evaluated.

Thanks!

Do you have any suggestion how can I write the tests for it? since it's a file I don't want how I write my tests hurt you in the future.

joolfe commented 1 year ago

Hi @fzn0x,

So just try to test a positive and negative test, to check that the file has been created you can use just existsSync method, have a look to the existing test to see some examples.

Best Regards.

fzn0x commented 1 year ago

Hi @fzn0x,

So just a try to test a positive and negative test, to check that the file has been created you can use just existsSync method, have a look to the existing test to see some examples.

Best Regards.

Thanks for the quick response!

joolfe commented 1 year ago

Closed due to inactivity

fzn0x commented 1 year ago

@joolfe hi we can close this for now, still quite busy irl, I will reach back later!