-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(jest): tests working client side too
- Loading branch information
1 parent
5c7fc66
commit 48c1a47
Showing
9 changed files
with
1,945 additions
and
389 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import * as path from 'path'; | ||
import { runTests } from 'vscode-test'; | ||
|
||
async function main() { | ||
try { | ||
// The folder containing the Extension Manifest package.json | ||
// Passed to `--extensionDevelopmentPath` | ||
const extensionDevelopmentPath = path.resolve(__dirname, '../../../'); | ||
|
||
// The path to the extension test script | ||
// Passed to --extensionTestsPath | ||
const extensionTestsPath = path.resolve(__dirname, '../../node_modules/vscode-jest-test-runner'); | ||
|
||
// Download VS Code, unzip it and run the integration test | ||
await runTests({ | ||
extensionDevelopmentPath, | ||
extensionTestsPath, | ||
launchArgs: ['--disable-extensions'], | ||
}); | ||
} catch (err) { | ||
console.error('Failed to run tests'); | ||
process.exit(1); | ||
} | ||
} | ||
|
||
main(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
module.exports = { | ||
moduleFileExtensions: ["js", "ts"], | ||
preset: "ts-jest", | ||
roots: ["<rootDir>/server"], //, "<rootDir>/client"], | ||
testMatch: ["**/*.test.ts"], | ||
roots: ["<rootDir>/server"], | ||
testRegex: "\\.test\\.ts$", | ||
verbose: true, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.