herbsjs / herbs-cli

Herbs CLI
https://herbsjs.org/
MIT License
29 stars 30 forks source link

feat: change location os tests files #170

Closed vitorgamer58 closed 1 year ago

vitorgamer58 commented 1 year ago

Change the folder of test files in command herbs new to work with new feature in herbarium: https://github.com/herbsjs/herbarium/pull/7

Proposed Changes

  1. Change location of test files

Readiness Checklist

Author/Contributor

Reviewing Maintainer

vitorgamer58 commented 1 year ago

I'm having a problem with an error.

For some reason, the first element of the for is undefined, which causes this error to happen.

D:\Documentos\Programacao\herbs\herbs-cli\node_modules\gluegun\build\index.js:15
    throw up;
    ^

TypeError: usecasesGroup[groupName] is not iterable
    at Command.run (D:\Documentos\Programacao\herbs\herbs-cli\src\commands\spec.js:41:49)
    at Runtime.<anonymous> (D:\Documentos\Programacao\herbs\herbs-cli\node_modules\gluegun\build\runtime\run.js:119:58)    at step (D:\Documentos\Programacao\herbs\herbs-cli\node_modules\gluegun\build\runtime\run.js:44:23)
    at Object.next (D:\Documentos\Programacao\herbs\herbs-cli\node_modules\gluegun\build\runtime\run.js:25:53)        
    at fulfilled (D:\Documentos\Programacao\herbs\herbs-cli\node_modules\gluegun\build\runtime\run.js:16:58)
PS D:\Documentos\Programacao\herbs\debug-issue-6\teste6>

However, in the spec.js file, by adding the following code after line 40:

if(usecasesGroup[groupName] === undefined) continue

The tests in the created project work... Screenshot_7426

dlojudice-vortx commented 1 year ago

@vitorgamer58 as discussed, we are not changing the defaults for a new project.

The only thing we are open to discuss is how CLI / herbarium can accept a different folder as a parameter to the default when herbs update or herbs spec.

vitorgamer58 commented 1 year ago

@vitorgamer58 as discussed, we are not changing the defaults for a new project.

The only thing we are open to discuss is how CLI / herbarium can accept a different folder as a parameter to the default when herbs update or herbs spec.

Different folder as a parameter, Ok.