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

Implementation of the export and import keywords to support, amongst others, unit tests. #497

Open
keithrooney opened this issue Jun 4, 2023 · 3 comments

Comments

@keithrooney
Copy link

Hey there,

Is there plans to implement the export and import keywords? Reviewing the code base, I don't believe it is currently implemented, token.go#L44.

I am using Otto, implementing various functions to automate particular tasks, however, I'd like to add unit tests for these functions.

Correct me if I'm wrong, but in order to accomplish my goal of adding unit tests for these functions, one requires these specific keywords to export the functions then import said functions to the appropriate test files.

Open to thoughts and/or suggestions.

All the best,

Keith.

@Asday
Copy link

Asday commented Jun 4, 2023

  • Otto targets ES5. ES6 features (eg: Typed Arrays) are not supported.

-- https://github.com/robertkrimen/otto#caveat-emptor

Though this is slowly changing.

Try a pull request.

@stevenh
Copy link
Collaborator

stevenh commented Jun 5, 2023

What @Asday happy to review PR's which extend our existing functionality.

@keithrooney
Copy link
Author

Absolutely @stevenh and @Asday ! Give me a few days to complete discovery on this item, understand the code base, implementation details, etc, after which I'll probably have a few questions. Once answered, I should be good to go. Feel free to assign this ticket to me (provided you've the ability to do so).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants
@stevenh @Asday @keithrooney and others