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 package.json files to plugins and plugin tests #34

Merged
merged 1 commit into from
Oct 1, 2018

Conversation

janpio
Copy link
Member

@janpio janpio commented Sep 30, 2018

This PR adds the most rudimentary package.json possible for plugins and plugin tests.

fixes #31

@janpio
Copy link
Member Author

janpio commented Sep 30, 2018

Yay, passing tests! (on Travis at least...)

Copy link
Member

@NiklasMerz NiklasMerz left a comment

Choose a reason for hiding this comment

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

I also tried this and did some tests. This should fix the failed builds.

Regardless the tests don´t really do much.

@janpio janpio merged commit c78d74a into master Oct 1, 2018
@janpio janpio deleted the janpio-add_plugin_package.json branch October 1, 2018 19:49
@janpio
Copy link
Member Author

janpio commented Oct 1, 2018

That is indeed true - but I am looking forward to changing that (or merging a PR that changes that. Any ideas?)

@NiklasMerz
Copy link
Member

At first it sounds complicated to test a test framework/tool. To me test are already beneficial to see if everything builds correctly.

Maybe we could add more functions to the plugins in the test folder, to test some cases. I think @purplecabbage already started to do that. We should have some successful and some failing tests in those plugins to at least cover some basics of testing.

(I could try to do some experiments when I find time in the next days)

@purplecabbage
Copy link
Contributor

I believe part of the issue here was just that cordova now expects plugins to have package.json files.
There are several tests which cover, an iOS plugin, with a build error, that should fail.
This definitely could be expanded to handle more cases. I would start by adding coverage just so we can see what modules/functions are not being tested.
😸
https://github.com/apache/cordova-paramedic/blob/master/spec/testable-plugin/tests/tests.js#L34

@janpio
Copy link
Member Author

janpio commented Oct 1, 2018

package.json is now fixed an Travis is green 💚

AppVeyor still needs some work though: #37

Adding coverage is great idea.

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.

Testing plugins need package.json
3 participants