Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEAT]: Add unit tests #24

Closed
mheob opened this issue May 6, 2023 · 0 comments · Fixed by #34
Closed

[FEAT]: Add unit tests #24

mheob opened this issue May 6, 2023 · 0 comments · Fixed by #34
Labels
enhancement New feature or request test

Comments

@mheob
Copy link
Owner

mheob commented May 6, 2023

Description

Some unit tests could help to make the script more robust.

Additional Information

No response

@mheob mheob added the enhancement New feature or request label May 6, 2023
kodiakhq bot pushed a commit that referenced this issue May 7, 2023
After the last fix, JavaScript files stopped working.
This is now fixed by splitting the source files into separate commonJS and ESM files.

Resolves #22 
Resolves #23

### Additional Notes

The following cases are working:

```
Test in Common JS: 'pnpm exec node foo.js':
{ name: 'pnpm', version: '8.4.0' }

Test in Common JS: 'pnpm exec node foo.cjs':
{ name: 'pnpm', version: '8.4.0' }

Test in ESM JS: 'pnpm exec node foo.mjs':
{ name: 'pnpm', version: '8.4.0' }

Test in TS: 'pnpm exec ts-node foo.ts':
{ name: 'pnpm', version: '8.4.0' }

Test in Common TS: 'pnpm exec ts-node foo.cts':
{ name: 'pnpm', version: '8.4.0' }
```

I am considering adding unit tests for this script (see #24).
@mheob mheob added the test label May 30, 2023
@kodiakhq kodiakhq bot closed this as completed in #34 Jun 1, 2023
kodiakhq bot pushed a commit that referenced this issue Jun 1, 2023
Resolves #24

## Changes

Add unit tests and run them in the GitHub actions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request test
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant