question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to test plugins?

See original GitHub issue

Yet another question 😉 I just created my first tiny httpyac plugin \o/. Same time its my first JS project ever, too.

https://github.com/rngtng/httpyac-plugin-yaml-body

No TS and all that jazz (yet) - but I wanted at least to test it before releasing. I got the test framework up and running, but I wonder how can I ensure cli.execute to load the plugin for testing? I thought of a deeper layer than the cli which could be evoked and load the plugin? Any ideas?

If you have the time pls check https://github.com/rngtng/httpyac-plugin-yaml-body/blob/main/test/index.test.js#L12-L17. Thanks

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:14 (14 by maintainers)

github_iconTop GitHub Comments

2reactions
rngtngcommented, Dec 6, 2021
1reaction
rngtngcommented, Dec 6, 2021

Updated: https://github.com/rngtng/httpyac-plugin-yaml-body/pull/2

I kept one high-level integration test, moved the edge cases to unit test. I c&p you getHeader to stay independent as much of the inner httpyac implementation. Next setting up pipeline and publish npm 😛

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Test WordPress Plugins Before Use
How to Test WordPress Plugins Before Use: A Step-by-Step Guide ; Download the server software of your choice to your computer, install, and...
Read more >
Plugin Integration Tests – WP-CLI - Make WordPress
Running tests locally · 1. Install PHPUnit · 2. Generate the plugin test files · 3. Initialize the testing environment locally · 4....
Read more >
How to Test WordPress Plugins - YouTube
Josh Pollock (Saturday Drive) and I discuss automated testing for WordPress plugins, and set up PHPunit with WP CLI along with a couple ......
Read more >
An Introduction To Automated Testing Of WordPress Plugins ...
Write Our Plugin Tests # ... Create a test-wp-meta-verify.php file in the tests folder. It will contain our plugin tests with the following...
Read more >
Developers centre - Testing Plugins Strategies - Apache Maven
In general, you need to include maven-plugin-testing-harness as a dependency, and create a *MojoTest (by convention) class which extends AbstractMojoTestCase .
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found