diff --git a/ci/container/test_component.sh b/ci/container/test_component.sh index d52a56b79..0ffdf5022 100755 --- a/ci/container/test_component.sh +++ b/ci/container/test_component.sh @@ -110,7 +110,7 @@ if [[ -z "$GITHUB_ACTIONS" ]]; then fi echo "[INFO] Running Tests: Test result: $WORKSPACE/junit.xml" -if ! ${MOCHA_CMD[@]} "$SOURCE_ROOT/test/**/*.js"; then +if ! ${MOCHA_CMD[@]} 'test/{unit,integration}/**/*.js'; then echo "[ERROR] Test failed" [[ -f "$WORKSPACE/junit.xml" ]] && cat $WORKSPACE/junit.xml exit 1 diff --git a/ci/test_windows.bat b/ci/test_windows.bat index c6764a8ca..fd600ccd4 100644 --- a/ci/test_windows.bat +++ b/ci/test_windows.bat @@ -73,7 +73,7 @@ start /b python hang_webserver.py 12345 > hang_webserver.out 2>&1 popd echo [INFO] Testing -cmd /c node_modules\.bin\mocha --timeout %TIMEOUT% --recursive --full-trace --color --reporter spec test/**/*.js +cmd /c node_modules\.bin\mocha --timeout %TIMEOUT% --recursive --full-trace --color --reporter spec \"test/{unit,integration}/**/*.js\" if %ERRORLEVEL% NEQ 0 ( echo [ERROR] failed to run mocha exit /b 1 diff --git a/package.json b/package.json index 96f8984b1..20e7df34d 100644 --- a/package.json +++ b/package.json @@ -67,9 +67,9 @@ "test:system": "mocha -timeout 180000 --recursive --full-trace system_test/*.js", "test:unit": "mocha -timeout 180000 --recursive --full-trace test/unit/**/*.js test/unit/*.js", "test:unit:coverage": "nyc npm run test:unit", - "test:ci": "mocha -timeout 180000 --recursive --full-trace test/**/*.js", + "test:ci": "mocha -timeout 180000 --recursive --full-trace 'test/{unit,integration}/**/*.js'", "test:ci:coverage": "nyc npm run test:ci", - "test:ci:withSystemTests": "mocha -timeout 180000 --recursive --full-trace test/**/*.js system_test/*.js", + "test:ci:withSystemTests": "mocha -timeout 180000 --recursive --full-trace 'test/{unit,integration}/**/*.js' system_test/*.js", "test:ci:withSystemTests:coverage": "nyc npm run test:ci:withSystemTests", "test:manual": "mocha -timeout 180000 --full-trace --full-trace test/integration/testManualConnection.js" },