From 7e8696f8926ee5793bc9c73413c572f957af7e9b Mon Sep 17 00:00:00 2001 From: diego Date: Tue, 18 Oct 2022 08:25:49 +0200 Subject: [PATCH] [misc] code coverage correction --- .travis.yml | 11 +++++++++++ package.json | 8 +++++--- types/mariadb-tests.ts | 1 + 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3b88b990..32cecb9c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,6 +13,17 @@ before_install: install: + - |- + case $TRAVIS_OS_NAME in + windows) + powershell -Command Invoke-WebRequest -Uri https://uploader.codecov.io/latest/windows/codecov.exe -Outfile codecov.exe + ;; + linux) + curl -Os https://uploader.codecov.io/latest/linux/codecov + chmod +x codecov + ls -lrt + ;; + esac - |- case $TRAVIS_OS_NAME in windows) diff --git a/package.json b/package.json index 5a3b3d3a..c515ad47 100644 --- a/package.json +++ b/package.json @@ -16,9 +16,11 @@ "test:types": "eslint \"types/*.ts\" ", "test:types-prettier": "prettier --write \"types/*.ts\"", "test:prettier": "prettier --write \"{tools,lib,test,benchmarks}/**/*.js\"", - "coverage": "npm run coverage:test && npm run coverage:report", + "coverage": "npm run coverage:test && npm run coverage:create && npm run coverage:send", "coverage:test": "nyc mocha --no-parallel --timeout 5000 \"test/**/*.js\"", - "coverage:report": "nyc report --reporter=text-lcov > coverage.lcov && codecov", + "coverage:report": "npm run coverage:create && npm run coverage:send", + "coverage:create": "nyc report --reporter=text-lcov > coverage.lcov", + "coverage:send": "./codecov --disable=gcov", "benchmark": "node benchmarks/benchmarks-all.js", "generate": "node ./tools/generate-mariadb.js" }, @@ -58,7 +60,7 @@ "@typescript-eslint/parser": "^5.33.1", "benchmark": "^2.1.4", "chai": "^4.3.6", - "chalk": "^5.1.2", + "chalk": "^4.1.2", "dom-parser": "^0.1.6", "error-stack-parser": "^2.1.4", "eslint": "^8.25.0", diff --git a/types/mariadb-tests.ts b/types/mariadb-tests.ts index 0c6ee5bf..8cdd8d07 100644 --- a/types/mariadb-tests.ts +++ b/types/mariadb-tests.ts @@ -100,6 +100,7 @@ async function testMisc(): Promise { let currRow = 0; const stream = prepare.queryStream([1]); for await (const row of stream) { + console.log(row); currRow++; } prepare.close();