-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29 from kortina/ak-cleanup-2
Continue cleanup from 26
- Loading branch information
Showing
27 changed files
with
9,187 additions
and
1,705 deletions.
There are no files selected for viewing
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 @@ | ||
12.16.3 |
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,18 +1,36 @@ | ||
{ | ||
"cSpell.words": [ | ||
"Backlinks", | ||
"Devops", | ||
"Suping", | ||
"basenames", | ||
"filepath", | ||
"jumplist", | ||
"notetaking", | ||
"nvalt", | ||
"prefill", | ||
"unist", | ||
"vpackage", | ||
"vpublish", | ||
"vsce", | ||
"vsix" | ||
] | ||
} | ||
"runInTerminal.commands": [ | ||
////////////////////// | ||
// jest typescript | ||
////////////////////// | ||
// jest: test line | ||
{ | ||
"cmd": "./jest-focused.sh ${relativeFile}:${line}", | ||
"match": "\\.ts$", | ||
"name": "l" | ||
}, | ||
// jest: test suite | ||
{ | ||
"cmd": "npx jest", | ||
"match": "\\.ts$", | ||
"name": "s" | ||
} | ||
], | ||
"cSpell.words": [ | ||
"Backlink", | ||
"Backlinks", | ||
"Devops", | ||
"Suping", | ||
"basenames", | ||
"filepath", | ||
"jumplist", | ||
"notetaking", | ||
"nvalt", | ||
"prefill", | ||
"unist", | ||
"vpackage", | ||
"vpublish", | ||
"vsce", | ||
"vsix" | ||
] | ||
} |
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 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,4 @@ | ||
// see: https://github.com/microsoft/vscode-test/issues/37 | ||
export const vscode = { | ||
// mock the vscode API which you use in your project. Jest will tell you which keys are missing. | ||
}; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,51 @@ | ||
#!/bin/bash | ||
# Usage: | ||
# Run test at line 248 of extension.test.js: | ||
# ./jest-run-focused-test.sh out/test/jest/extension.test.js:248 | ||
# Run all tests in extension.test.js: | ||
# ./jest-run-focused-test.sh out/test/jest/extension.test.js | ||
# | ||
set -e | ||
# location of script that will parse out the test function given a filepath and line | ||
test_at_line_js="out/test-at-line.js" | ||
|
||
# arg $1 is the test filename | ||
# replace "/./"" with "/" (artifact of vscode-run-in-terminal starting relative path with a "./") | ||
filename=`echo "$1" | sed 's/\.\/src/.\/out/'` | ||
# replace 'ts' with 'js' in filename | ||
filename=`echo "$filename" | sed 's/\.ts$/.js/'` | ||
filename=`echo "$filename" | sed 's/\.ts:/.js:/'` | ||
# strip the linenumber off the location | ||
filename=`echo "$filename" | sed 's/:.*//'` | ||
|
||
config_file="jest.config.js" | ||
|
||
npm run compile | ||
|
||
# if given file + line number, parse out the test name to run and pass in as a focused test run | ||
if echo "$1" | grep -q ":[0-9]\+$" ; then | ||
cmd="node $(pwd)/ $testloc" | ||
bdd_description=$(node $(pwd)/$test_at_line_js $1) | ||
bdd_size=${#bdd_description} | ||
if [ $bdd_size -eq 0 ]; then | ||
echo "Not in a describe block, nothing to run!" | ||
exit 1 | ||
fi | ||
else | ||
echo "No line number, running entire file." | ||
fi | ||
|
||
echo "" | ||
echo "$bdd_description" | ||
echo "" | ||
shift; | ||
|
||
# Removed --max_old_space_size=4096 | ||
if [[ $* == *--debug* ]] | ||
then | ||
set -x | ||
node --inspect --inspect-brk ./node_modules/.bin/jest --config "$config_file" --runInBand "$filename" -t "$bdd_description" "$@" | ||
else | ||
set -x | ||
node ./node_modules/.bin/jest --config "$config_file" "$filename" -t "$bdd_description" "$@" | ||
fi |
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,6 @@ | ||
module.exports = { | ||
// roots: ['<rootDir>/out'], | ||
preset: 'ts-jest', | ||
testEnvironment: 'node', | ||
testMatch: ['<rootDir>/out/test/jest/**/*.test.js'], // for some reason I don't get, there are tests compile in out/test and out/src/test | ||
}; |
Oops, something went wrong.