How to run added tests for new kibana custom plugins

I added a test in JS in kibana, how do I run it?

lazhu@lazhu-mac kibana % git status
On branch 7.8
Your branch is ahead of 'origin/7.8' by 1 commit.
(use "git push" to publish your local commits)Changes not staged for commit:
(use "git add ..." to update what will be committed)
(use "git restore ..." to discard changes in working directory)
modified: src/plugins/shard_map/server/routes/index.ts
modified: yarn.lockUntracked files:
(use "git add ..." to include in what will be committed)
src/plugins/shard_map/public/components/app.test.jsno changes added to commit (use "git add" and/or "git commit -a")
lazhu@lazhu-mac kibana % node scripts/jest app
/Users/lazhu/proto/github/larryzhu2018/kibana/src/dev/jest/cli.js:25
_jest.default.run(process.argv.slice(2));
^TypeError: Cannot read property 'run' of undefined

(https://proddev-saas.slack.com/archives/DJ1GZP77A/p1599507475001300)

if I run "yarn test" it runs all the tests, and many of those fail so I could not get it to run my new tests.
Is there a way to run just my app.test.js tests?

Have you checked these links? It would be a good starting point


https://www.elastic.co/guide/en/kibana/master/development.html

Thanks
Rashmi

thanks. The following command from the developer link works for me:
yarn test:jest --watch -t loading src/plugins/shard_map/public/components/app.test.js

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.