From 404f1f2e44357eab3770c2185e946379cba1004b Mon Sep 17 00:00:00 2001 From: David Manthey Date: Mon, 6 Nov 2023 14:57:58 -0500 Subject: [PATCH] test: Fix reporting coverage The coverage of the tests was being reported. --- .pre-commit-config.yaml | 4 ---- package.json | 4 ++-- webpack.base.config.js | 10 ++++++---- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 36a8f77244..dfd3baa4a2 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -54,10 +54,6 @@ repos: - "hist,indext,pixelx,thex,hight,reenable,lastr,xdescribe,afterall,countr" - --skip - examples/sld/index.pug,package-lock.json,examples/reprojection/proj.json,website/themes/agency/source/vendor/jquery/jquery.min.js,examples/reprojection/capitals.json -- repo: https://github.com/syntaqx/git-hooks - rev: v0.0.18 - hooks: - - id: circleci-config-validate - repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook rev: v9.5.0 hooks: diff --git a/package.json b/package.json index 98cc13100d..382ee800e8 100644 --- a/package.json +++ b/package.json @@ -138,7 +138,7 @@ "lint": "eslint --cache . --max-warnings=0", "format": "eslint --cache --fix . && stylelint **/*.styl --fix", "puglint": "pug-lint src examples", - "styllint": "stylelint **/*.styl", + "stylelint": "stylelint **/*.styl", "glsllint": "chmod +x node_modules/glslang-validator-prebuilt-predownloaded/bin/glslangValidator.linux; find . \\( -name '*.frag' \\) -exec sh -c 'for n; do python scripts/preprocess_glsl.py \"$n\" | node_modules/glslang-validator-prebuilt-predownloaded/bin/glslangValidator.linux --stdin -S frag || exit 1; done' sh {} \\+ && find . \\( -name '*.vert' \\) -exec sh -c 'for n; do python scripts/preprocess_glsl.py \"$n\" | node_modules/glslang-validator-prebuilt-predownloaded/bin/glslangValidator.linux --stdin -S vert || exit 1; done' sh {} \\+", "test-headless": "GEOJS_TEST_CASE=tests/test-unit.js karma start karma-cov.conf.js --single-run --browsers ChromeHeadlessTouch,FirefoxHeadlessTouch", "test-headless-all": "GEOJS_TEST_CASE=tests/test-unit.js karma start karma-cov.conf.js --single-run --browsers ChromeHeadlessTouch,FirefoxHeadlessTouch", @@ -152,7 +152,7 @@ "get-data-files": "node scripts/datastore.js dist/data", "ci-clean": "git clean -fxd dist -e dist/data jsdoc/tmpl jsdoc/static images lcov", "ci": "npm-run-all ci-build ci-test", - "ci-build": "npm-run-all -c -p build-full build-lean docs get-data-files lint puglint glsllint styllint build-examples build-tutorials", + "ci-build": "npm-run-all -c -p build-full build-lean docs get-data-files lint puglint glsllint stylelint build-examples build-tutorials", "ci-test": "npm-run-all test-headless test-webglheadless test-headed test-tutorials", "ci-xvfb": "npm-run-all ci-clean ci-build && TEST_SAVE_IMAGE='all' xvfb-run -s '-ac -screen 0 1280x1024x24' npm run ci-test", "start": "karma start karma.conf.js", diff --git a/webpack.base.config.js b/webpack.base.config.js index 0c3d7ab33f..78a90e1a86 100644 --- a/webpack.base.config.js +++ b/webpack.base.config.js @@ -55,7 +55,11 @@ module.exports = { module: { rules: [{ test: /\.js$/, - // include: path.resolve('src'), + include: [ + path.resolve('src'), + path.resolve('examples'), + path.resolve('tutorials') + ], exclude: /node_modules\/(?!kdbush\/).*/, use: [{ loader: 'babel-loader', @@ -69,9 +73,7 @@ module.exports = { }, { test: /\.js$/, include: [ - path.resolve('tests'), - path.resolve('examples'), - path.resolve('tutorials') + path.resolve('tests') ], use: [{ loader: 'babel-loader',