From ecf019a6b85e585a34d5a9c2a00c5c4bc1831101 Mon Sep 17 00:00:00 2001 From: Sebastian Malton Date: Tue, 30 Mar 2021 08:25:16 -0400 Subject: [PATCH] fix a few wording issues Signed-off-by: Sebastian Malton Update docs/extensions/testing-and-publishing/testing.md Co-authored-by: Jim Ehrismann <40840436+jim-docker@users.noreply.github.com> Update docs/extensions/testing-and-publishing/testing.md Co-authored-by: Jim Ehrismann <40840436+jim-docker@users.noreply.github.com> --- docs/extensions/testing-and-publishing/testing.md | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/docs/extensions/testing-and-publishing/testing.md b/docs/extensions/testing-and-publishing/testing.md index b07f0a12eb..af178efeb7 100644 --- a/docs/extensions/testing-and-publishing/testing.md +++ b/docs/extensions/testing-and-publishing/testing.md @@ -2,11 +2,10 @@ ## Renderer Process Unit Testing -UI components in extension renderer process are based on React/ReactDOM. +UI components in the extension's renderer process are based on React/ReactDOM. These components can be tested by popular React testing tools like [React Testing Library](https://github.com/testing-library/react-testing-library). -If you are using the [Yeoman Lens Extension Generator](https://github.com/lensapp/generator-lens-ext) to scaffold extension project. -The testing environment for render process are already setup for you. +If you are using the [Yeoman Lens Extension Generator](https://github.com/lensapp/generator-lens-ext) to scaffold extension project then the testing environment for render process is already set up for you. Just use `npm start` or `yarn test` to run the tests. For example, I have a component `GlobalPageMenuIcon` and want to test if `props.navigate` is called when user clicks the icon. @@ -49,10 +48,9 @@ Extend your tests based on the examples. ## Main Process Unit Testing -Code in the extension main process are just normal JavaScript files that has access to extension api, you can write unit tests using any testing framework. +Code in the extension's main process consists of normal JavaScript files that have access to extension api, you can write unit tests using any testing framework. -If you are using the [Yeoman Lens Extension Generator](https://github.com/lensapp/generator-lens-ext) to scaffold your extension project. -The testing environment [Jest](https://jestjs.io/) are setup for you. +If you are using the [Yeoman Lens Extension Generator](https://github.com/lensapp/generator-lens-ext) to scaffold your extension project then the [Jest](https://jestjs.io/) testing environment is set up for you. Just use `npm start` or `yarn test` to run the tests. ## Tips