Skip to content

Commit

Permalink
feat(developer): kmc-copy functionality and unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mcdurdin committed Oct 21, 2024
1 parent 70251dd commit e99d950
Show file tree
Hide file tree
Showing 8 changed files with 860 additions and 21 deletions.
2 changes: 1 addition & 1 deletion developer/src/kmc-copy/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module.exports = {
overrides: [
{
files:"src/**/*.ts",
extends: ["../../../common/web/eslint/eslintNoNodeImports.js"],
extends: ["../../../common/tools/eslint/eslintNoNodeImports.js"],
}
],
rules: {
Expand Down
3 changes: 2 additions & 1 deletion developer/src/kmc-copy/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,12 @@ builder_parse "$@"
#-------------------------------------------------------------------------------------------------------------------

do_test() {
# note: `export TEST_SAVE_ARTIFACTS=1` to save a copy of artifacts to temp path
eslint .
cd test
tsc --build
cd ..
readonly C8_THRESHOLD=30
readonly C8_THRESHOLD=70
c8 -skip-full --reporter=lcov --reporter=text --lines $C8_THRESHOLD --statements $C8_THRESHOLD --branches $C8_THRESHOLD --functions $C8_THRESHOLD mocha "${builder_extra_params[@]}"
builder_echo warning "Coverage thresholds are currently $C8_THRESHOLD%, which is lower than ideal."
builder_echo warning "Please increase threshold in build.sh as test coverage improves."
Expand Down
3 changes: 2 additions & 1 deletion developer/src/kmc-copy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@
"exclude-after-remap": true,
"exclude": [
"test/",
"src/template/"
"src/template/",
"src/main.ts"
]
},
"repository": {
Expand Down
Loading

0 comments on commit e99d950

Please sign in to comment.