Skip to content

Commit

Permalink
Use jest test runner
Browse files Browse the repository at this point in the history
  • Loading branch information
bmealhouse committed Jan 2, 2020
1 parent 96d7e00 commit 3fcb8bd
Show file tree
Hide file tree
Showing 35 changed files with 4,693 additions and 2,483 deletions.
30 changes: 28 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,39 @@
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"stopOnEntry": false,
"sourceMaps": true,
"smartStep": true,
"args": [
"--disable-extensions",
"--extensionDevelopmentPath=${workspaceFolder}",
"--extensionTestsPath=${workspaceFolder}/dist/test"
"--extensionTestsPath=${workspaceFolder}/dist/test/jest-test-runner"
],
"skipFiles": ["<node_internals>/**/*.js"],
"outFiles": ["${workspaceFolder}/dist/**/*.js"],
"preLaunchTask": "npm: compile"
"preLaunchTask": "npm: compile",
"internalConsoleOptions": "openOnSessionStart"
},
{
"name": "Extension Tests (Current File)",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"stopOnEntry": false,
"sourceMaps": true,
"smartStep": true,
"args": [
"--disable-extensions",
"--extensionDevelopmentPath=${workspaceFolder}",
"--extensionTestsPath=${workspaceFolder}/dist/test/jest-test-runner"
],
"skipFiles": ["<node_internals>/**/*.js"],
"outFiles": ["${workspaceFolder}/dist/**/*.js"],
"preLaunchTask": "npm: compile",
"internalConsoleOptions": "openOnSessionStart",
"env": {
"TEST_FILE": "${file}"
}
}
]
}
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [1.3.0] - 2020-01-02

### Added

- Add `shifty.enableDebugging` command

### Changed

- Use `jest` for testing
- Mock VS Code configuration APIs for testing

## [1.2.4] - 2019-08-09

### Fixed
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ Anything shifty can do is exposed via commands. Open the VS Code command palette
- Start shift interval
- Pause shift interval
- Show status
- Enable debugging

## Settings

Expand Down
92 changes: 64 additions & 28 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,11 @@
"command": "shifty.showStatus",
"title": "Show status",
"category": "shifty"
},
{
"command": "shifty.enableDebugging",
"title": "Enable debugging",
"category": "shifty"
}
]
},
Expand All @@ -206,14 +211,14 @@
},
"prettier": {
"useTabs": false,
"semi": true,
"semi": false,
"singleQuote": true,
"trailingComma": "all",
"bracketSpacing": false
},
"xo": {
"envs": [
"mocha"
"jest"
],
"prettier": true,
"plugins": [
Expand All @@ -231,54 +236,85 @@
"rules": {
"unicorn/no-abusive-eslint-disable": "off",
"capitalized-comments": "off",
"no-unused-vars": [
"@typescript-eslint/indent": [
"error",
2
],
"@typescript-eslint/member-delimiter-style": [
"error",
{
"multiline": {
"delimiter": "none"
}
}
],
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-unused-vars": [
"error",
{
"ignoreRestSiblings": true,
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_"
}
],
"@typescript-eslint/indent": [
"@typescript-eslint/semi": [
"error",
2
"never"
],
"filenames/match-exported": [
"error",
"kebab",
"^__"
]
}
},
"overrides": [
{
"files": "**/*.test.ts",
"rules": {
"@typescript-eslint/quotes": "off"
}
}
]
},
"dependencies": {
"node-ipc": "9.1.1",
"shortid": "2.2.14"
"shortid": "2.2.15"
},
"devDependencies": {
"@types/mocha": "5.2.7",
"@types/node": "12.6.2",
"@jest/core": "24.9.0",
"@jest/test-result": "24.9.0",
"@jest/types": "24.9.0",
"@types/chalk": "2.2.0",
"@types/jest": "24.0.25",
"@types/node": "13.1.2",
"@types/node-ipc": "9.1.1",
"@types/shortid": "0.0.29",
"@types/sinon": "7.0.13",
"@typescript-eslint/eslint-plugin": "1.11.0",
"@typescript-eslint/parser": "1.11.0",
"babel-eslint": "10.0.2",
"eslint": "6.0.1",
"eslint-config-xo-typescript": "0.15.0",
"@types/source-map-support": "0.5.0",
"@typescript-eslint/eslint-plugin": "2.14.0",
"@typescript-eslint/parser": "2.14.0",
"babel-eslint": "10.0.3",
"chalk": "3.0.0",
"eslint": "6.8.0",
"eslint-config-xo-typescript": "0.24.1",
"eslint-plugin-filenames": "1.3.2",
"husky": "3.0.0",
"lint-staged": "9.2.0",
"patch-package": "6.1.2",
"rimraf": "2.6.3",
"sinon": "7.3.2",
"ts-loader": "6.0.4",
"typescript": "3.5.3",
"vsce": "1.65.0",
"vscode": "1.1.35",
"wait-for-expect": "1.2.0",
"webpack": "4.35.3",
"webpack-cli": "3.3.5",
"xo": "0.24.0"
"husky": "3.1.0",
"jest": "24.9.0",
"jest-core": "0.0.0",
"jest-environment-node": "24.9.0",
"jest-environment-vscode": "1.0.0",
"lint-staged": "9.5.0",
"patch-package": "6.2.0",
"rimraf": "3.0.0",
"source-map-support": "0.5.16",
"ts-jest": "24.2.0",
"ts-loader": "6.2.1",
"typescript": "3.7.4",
"vsce": "1.71.0",
"vscode": "1.1.36",
"wait-for-expect": "3.0.1",
"webpack": "4.41.5",
"webpack-cli": "3.3.10",
"xo": "0.25.3"
},
"scripts": {
"compile": "rimraf ./dist && tsc -p ./ --outDir ./dist",
Expand Down
Loading

0 comments on commit 3fcb8bd

Please sign in to comment.