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

Add close method to Plugin (#4670) #4785

Merged
merged 2 commits into from
Apr 17, 2020

Conversation

gvatn
Copy link
Contributor

@gvatn gvatn commented Apr 16, 2020

Went for a "good first issue": #4670
Added a close() method to Plugin.
Looked at File.close and added the same implementation: Adds a readonly rid, and runs close from ops/resources.ts, returning void.

I don't think there is testing of plugins set up in cli/js/tests, but a few simple tests in test_plugin which can be checked by cargo test.

In test_plugin/test.js I record the open resources at the beginning of the file, and check for equality after running Plugin.close() in the end.
This is a simple adaptation of assertResources() in cli/js/testing.js, which would probably be preferable if plugin tests were added to cli/js/tests.

@CLAassistant
Copy link

CLAassistant commented Apr 16, 2020

CLA assistant check)
All committers have signed the CLA.

Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @gvatn

@bartlomieju bartlomieju merged commit 260084c into denoland:master Apr 17, 2020
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.

None yet

3 participants