Skip to content

Commit

Permalink
addressing PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
devaradhanm committed Feb 6, 2019
1 parent 1a03601 commit e376a4f
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 21 deletions.
16 changes: 0 additions & 16 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,6 @@
"panel": "dedicated"
}
},
{
"label": "E2E test current file in VSCode",
"command": "node",
"args": [
"${workspaceRoot}/node_modules/jest/bin/jest.js",
"--runInBand",
"--config=${workspaceRoot}/jest.e2e.config.js",
"${relativeFile}"
],
"group": "test",
"type": "shell",
"presentation": {
"reveal": "always",
"panel": "dedicated"
}
},
{
"label": "Begin Jest watch session",
"command": "node",
Expand Down
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,10 @@ We use [jest](https://github.com/facebook/jest) as our test framework and [puppe
To run a task from the command palette, press **Ctrl + Shift + P**, select `Tasks: Run Task`, and select the task you want to run:
- `npm: test` runs all unit tests
- `Test current file in VSCode` runs just the unit tests in the currently-opened file
- `Test current file in VSCode` runs just the tests in the currently-opened test file
- `npm: test:e2e` runs all end-to-end tests
- `E2E test current file in VSCode` runs just the end-to-end tests in the currently-opened file
To debug inside VS Code, set a breakpoint and click the debug button or press **F5**. Note that there are 2 debug targets (one for unit tests and one for end-to-end tests); be sure to use the appropriate one for the test you are debugging.
To debug inside VS Code, set a breakpoint and click the debug button or press **F5**.
To debug using an external tool, run the `Debug current test file outside VS Code` task. In Chrome, for example, navigate to `chrome://inspect` and click `Open dedicated DevTools for Node`.
Expand Down
2 changes: 1 addition & 1 deletion src/tests/end-to-end/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ module.exports = {
'js',
],
rootDir: rootDir,
roots: ['<rootDir>/src/tests/end-to-end'],
roots: [currentDir],
reporters: ['default', ['jest-junit', { outputDirectory: '.', outputName: '<rootDir>/test-results/e2e/junit-e2e.xml' }]],
setupFilesAfterEnv: [`${currentDir}/setup/test-setup.ts`],
globals: {
Expand Down
1 change: 0 additions & 1 deletion src/tests/jest.common.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// Licensed under the MIT License.
module.exports = {
clearMocks: true,
moduleFileExtensions: ['ts', 'tsx', 'js'],
moduleNameMapper: {
'office-ui-fabric-react/lib/(.*)$': 'office-ui-fabric-react/lib-commonjs/$1',
'@uifabric/utilities': '@uifabric/utilities/lib-commonjs',
Expand Down

0 comments on commit e376a4f

Please sign in to comment.