Skip to content

test(e2e): add nominal tests for exec & init CLI commands#434

Merged
fraxken merged 1 commit into
NodeSecure:masterfrom
ErwanRaulo:test-cli-integration
May 9, 2025
Merged

test(e2e): add nominal tests for exec & init CLI commands#434
fraxken merged 1 commit into
NodeSecure:masterfrom
ErwanRaulo:test-cli-integration

Conversation

@ErwanRaulo
Copy link
Copy Markdown
Contributor

@ErwanRaulo ErwanRaulo commented Dec 31, 2024

TOFIX: could run tests before TS migration, now something goes wrong with childprocess and execution path.

when running nreport init, main process throws the same error :
Error: ENOENT: no such file or directory, open 'C:<yourDevDir>\report\dist\views\template.html'

process try to access views from dist folder but it does not exists, should be added to dist folder as asset in tsconfig file to include a copy when compiling typescript

@ErwanRaulo ErwanRaulo force-pushed the test-cli-integration branch 2 times, most recently from 9425a2f to bae3766 Compare December 31, 2024 23:46
Comment thread package.json Outdated
Comment thread test/helpers/reportCommandRunner.ts Outdated
Comment thread test/commands/execute.spec.ts Outdated
Comment thread test/commands/initialize.spec.ts Outdated
@PierreDemailly
Copy link
Copy Markdown
Member

Hi @ErwanRaulo

when running nreport init, main process throws the same error :
Error: ENOENT: no such file or directory, open 'C:\report\dist\views\template.html'

I don't have this problem, are you sure you built the project first ?
The "rimraf dist/views && cp -r views dist/views" script should work 🤔
image

@ErwanRaulo ErwanRaulo force-pushed the test-cli-integration branch from bae3766 to 1c7450a Compare January 19, 2025 17:24
Comment thread package.json Outdated
Comment thread test/commands/execute.spec.ts Outdated
Copy link
Copy Markdown
Member

@PierreDemailly PierreDemailly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit picks, this is good job 💪

Comment thread test/commands/execute.spec.ts Outdated
Comment thread test/commands/execute.spec.ts Outdated
Comment thread test/commands/execute.spec.ts Outdated
Comment thread test/commands/initialize.spec.ts Outdated
Comment thread test/commands/initialize.spec.ts Outdated
Comment thread test/commands/initialize.spec.ts Outdated
Comment thread test/commands/initialize.spec.ts Outdated
@ErwanRaulo
Copy link
Copy Markdown
Contributor Author

Thanks for feedback, I will correct them all soon.

And yes I can run " nreport init " now, don't known if it was thanks to the latest commit or my fault but in my TS migration PR I've used rimraf also.

@ErwanRaulo ErwanRaulo force-pushed the test-cli-integration branch from 1c7450a to e503073 Compare May 9, 2025 08:01
@ErwanRaulo ErwanRaulo marked this pull request as ready for review May 9, 2025 08:02
@ErwanRaulo ErwanRaulo force-pushed the test-cli-integration branch from e503073 to 6b1ab6c Compare May 9, 2025 08:07
Comment thread test/commands/execute.e2e-spec.ts Outdated
Comment thread test/helpers/reportCommandRunner.ts Outdated
Comment thread test/commands/initialize.e2e-spec.ts Outdated
Comment thread test/helpers/reportCommandRunner.ts Outdated
no breaking changes
use childprocess to collect CLI stdout
missing limit case tests
fix NodeSecure#395
@ErwanRaulo ErwanRaulo force-pushed the test-cli-integration branch from 6b1ab6c to ecdb9f4 Compare May 9, 2025 15:48
@fraxken fraxken merged commit 7806eba into NodeSecure:master May 9, 2025
5 checks passed
@ErwanRaulo ErwanRaulo deleted the test-cli-integration branch May 10, 2025 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants