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

njs testing #3

Open
joh-klein opened this issue Jan 4, 2022 · 2 comments
Open

njs testing #3

joh-klein opened this issue Jan 4, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@joh-klein
Copy link

I know this is called "nginx-testing" – but since you also provide njs binaries …

Can you provide a small example how to test things against njs? Would that even be possible? My usecase: since njs only has a subset of included objects etc it would be helpfull to unit test certain functions against that subset without doing the "nginx roundtrip".

I apologize in advance, if this is the wrong repo to open the issue!

@jirutka
Copy link
Owner

jirutka commented Apr 2, 2022

I’d love to have this feature, but since njs doesn’t provide the modules loader (you cannot use import/require), it’s not so easy to implement it.

Since it’s not so important to me at this moment and I’m very busy with other projects, I’d need some funding to work on this feature.

@jirutka jirutka added the enhancement New feature or request label Apr 2, 2022
@timofei-iatsenko
Copy link

since njs doesn’t provide the modules loader

Currently, it's possible to use imports in entrypoints pased to njs, look for my comment for more explanation:
nginx/njs#623 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants