Skip to content

Commit

Permalink
✅ Test: fix test configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
upupming committed Apr 26, 2021
1 parent 0a3662a commit e170f45
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 5 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,6 @@ package-lock.json
coverage
.coveralls.yml
.DS_Store
dist
dist
tmp
assets/test.md
7 changes: 5 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,13 @@
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"--disable-extensions",
"--user-data-dir=tmp",
"--extensionDevelopmentPath=${workspaceFolder}",
"--extensionTestsPath=${workspaceFolder}/dist/test/runner/index"
"--extensionTestsPath=${workspaceFolder}/out/test/runner/index"
],
"outFiles": ["${workspaceFolder}/dist/test/**/*.js"]
"outFiles": ["${workspaceFolder}/out/test/**/*.js"],
"preLaunchTask": "npm: test-compile"
}
]
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@
"compile": "webpack --mode development",
"watch": "webpack --mode development --watch",
"test": "tsc -p ./ && node ./out/test/run-test.js",
"test-compile": "tsc -p ./",
"lint": "eslint --fix --ext .js,.jsx,.ts,.tsx .",
"cz": "lint-staged && git-cz",
"release": "run bump-version"
Expand Down
2 changes: 1 addition & 1 deletion src/vs-picgo/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ export default class VSPicgo extends EventEmitter {
await editor?.edit(
asyncWrapper(async (textEditor) => {
textEditor.replace(editor.selection, urlText)
await showInfo(`image uploaded successfully.`)
this.emit(EVSPicgoHooks.updated, urlText)
await showInfo(`image uploaded successfully.`)
})
)
})
Expand Down
2 changes: 1 addition & 1 deletion test/run-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ async function main() {
const extensionDevelopmentPath = path.resolve(__dirname, '../../')

// The path to test runner
const extensionTestsPath = path.resolve(__dirname, './runner')
const extensionTestsPath = path.resolve(__dirname, './runner/index')

// Download VS code, unzip it and run the integration test
await runTests({ extensionDevelopmentPath, extensionTestsPath })
Expand Down

0 comments on commit e170f45

Please sign in to comment.