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

Fix #331 - Implement uswWsl flag and POSIX <-> Windows path mapping #375

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 12 additions & 11 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Bug-fixes within the same version aren't needed
## Master

* Prevent ANSI escape codes from appearing in test messages - seanpoulter
* Support Windows Subsystem for Linux and add the useWsl option - mojadev
* Your message here - name

-->
Expand Down Expand Up @@ -155,7 +156,7 @@ Bug-fixes within the same version aren't needed
* Use "jest-test-typescript-parser" for our TypeScript parser - orta
* Bumps min VS code release - orta

Note: This release consolidates a lot of code with the Jest project, and so if you have a custom `testRegex` and use
Note: This release consolidates a lot of code with the Jest project, and so if you have a custom `testRegex` and use
Jest below v20, chances are the decorators will not show. Everything else should be 👍 - orta

### 2.0.4
Expand All @@ -179,9 +180,9 @@ Note: This release consolidates a lot of code with the Jest project, and so if y

* Move all of the Jest specific code into a new repo: [jest-editor-support](https://github.com/facebook/jest/tree/master/packages/jest-editor-support) where
we can share the code with a nuclide implementation. This brings some changes to the development process (see the README) but should only affect users
if we've missed something in moving over.
if we've missed something in moving over.

- orta / bookman25 / cpojer
- orta / bookman25 / cpojer

* Significant improvements to JavaScript parsers - bookman25
* Introduction of TypeScript support - bookman25
Expand All @@ -205,14 +206,14 @@ Note: This release consolidates a lot of code with the Jest project, and so if y

### 1.6.1

* More windows improvements - KalleOtt
* More windows improvements - KalleOtt

### 1.6.0

* Separation of VS Code specific code from the extension by creating a lib directory,
* Separation of VS Code specific code from the extension by creating a lib directory,
in preparation for moving to the Jest repo - https://github.com/facebook/jest/issues/2183 - orta
* Minor improvements for create-react users - orta
* Support for running Jest even in repos where Jest is not a direct dependency via the command `Start Jest Runner` - you will definitely need to set the per-project `.vscode/settings.json` to whatever would normally trigger a jest run - orta
* Support for running Jest even in repos where Jest is not a direct dependency via the command `Start Jest Runner` - you will definitely need to set the per-project `.vscode/settings.json` to whatever would normally trigger a jest run - orta

### 1.5.1

Expand All @@ -221,7 +222,7 @@ Note: This release consolidates a lot of code with the Jest project, and so if y

### 1.5.0

* Adds support for running the tests inside `create react` apps - orta
* Adds support for running the tests inside `create react` apps - orta

### 1.4.0

Expand All @@ -237,7 +238,7 @@ Note: This release consolidates a lot of code with the Jest project, and so if y

### 1.2.0

* Adds syntax highlights for the JSX in `.js.snap` files - orta
* Adds syntax highlights for the JSX in `.js.snap` files - orta

### 1.1.0

Expand All @@ -247,7 +248,7 @@ Note: This release consolidates a lot of code with the Jest project, and so if y
* You can define your own path to the Jest test runner - orta
* Not a feature, but the code has been thoroughly commented - orta
* Improvements to parsing passing test files - orta
* Only run JS parser on files that match the Jest tesRegex - orta
* Only run JS parser on files that match the Jest tesRegex - orta

### 1.0.3

Expand All @@ -264,7 +265,7 @@ Note: This release consolidates a lot of code with the Jest project, and so if y
* Starts Jest automatically when you're in a project with Jest installed.
* Show individual fail / passes inline.
* Show fails inside the problem inspector.
* Highlights the errors next to the `expect` functions
* Highlights the errors next to the `expect` functions

- orta

Expand All @@ -283,6 +284,6 @@ Note: This release consolidates a lot of code with the Jest project, and so if y
* Adds statusbar support - orta
* Adds fails to the problems section - orta

### 0.0.3
### 0.0.3

* Parses current file for it/test blocks - orta
18 changes: 14 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Content
* [Wanted](#wanted)
* [Troubleshooting](#troubleshooting)
* [start jest from non-root folder](#start-jest-from-non-root-folder)
* [run jest in Windows Subsystem for Linux](#run-jest-in-windows-subsystem-for-linux)
* [non-standard environments](#non-standard-environments)
* [plugin not running as expect? try self-diagnosis](#plugin-not-running-as-expect-try-self-diagnosis)
* [Want to Contribute?](#want-to-contribute)
Expand Down Expand Up @@ -139,20 +140,29 @@ These are the [activation events](https://code.visualstudio.com/docs/extensionAP

These are the things that will trigger the extension loading. If one of these applies, and you're not seeing the "Jest" in the bottom bar, reference the self-diagnosis below

### run jest in Windows Subsystem for Linux

In order to execute jest in WSL (Window Subsystem for Linux), enable the useWsl flag in your workspace settings.

```json
"jest.pathToJest": "npm run test -- --coverage",
"jest.useWsl": true,
```

### non-standard environments
vscode-jest supports common jest configuration, such as when jest is in `root/node_modules/.bin/jest`, or for react-native `root/node_modules/react-native-scripts`.
vscode-jest supports common jest configuration, such as when jest is in `root/node_modules/.bin/jest`, or for react-native `root/node_modules/react-native-scripts`.

However, if your repo doesn't fall into these patterns or you want to pass extra parameters, you can easily use the `jest.pathToJest` or `jest.pathToConfig` settings to instruct the plugin on how to start jest. You can even use the scripts from package.json, such as `npm run test --` or `yarn test`. Feel free to experiment and search the issues for many examples.

### plugin not running as expect? try self-diagnosis
If your can execute jest tests on command line but vscode-jest was not running as expected, here is what you can do to find out what it is actually doing:
1. click on `Jest:stopped` on status bar to show Jest Output window:
1. click on `Jest:stopped` on status bar to show Jest Output window:
<img src="https://github.com/jest-community/vscode-jest/raw/master/images/output-channel.png" alt="Screenshot of the tool" width="100%">
1. turn on the debug mode: set `"jest.debugMode": true` in `.vscode/settings.json`
1. turn on the debug mode: set `"jest.debugMode": true` in `.vscode/settings.json`
1. restart vscode-jest or reload the window (via `Reload Window` command)
1. open the developer tool (via `Help > Toggle Developer Tools` menu), you should see more information including how we extract jest config and spawn jest processes.

Hopefully most issues would be pretty obvious after seeing these extra output, and you can probably fix most yourself by customizing the `jest.pathToJest` and other settings.
Hopefully most issues would be pretty obvious after seeing these extra output, and you can probably fix most yourself by customizing the `jest.pathToJest` and other settings.

## Want to Contribute?

Expand Down
Loading