I am new to the Javascript and Kibana.
Based on the discussion on Sonarqube topic, i am trying to write a test case for basic hello-world plugin (generated by plugin generator)
I want to achieve something like call the API and test the resposne code or response
created index.js in hello_world/server/__test__ folder
Overall the integration tests are more lightweight, so if you just want to test your API and don't have extensive needs for a bunch of sample test data in Elasticsearch, I'd go with that option. Only use functional tests if you know you need them.
To run a jest integration test: yarn test:jest_integration plugins/my-plugin/server/integration_tests/my_test_file.ts
To run an API functional test: node scripts/functional_tests_server --config [directory]/config.js node, and then once the server fires up: scripts/functional_test_runner --config [directory]/config.js
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.