Browse Source

Replaced "mcover" by "instrument" for code coverage

tags/v2
Cédric Belin 6 days ago
parent
commit
a2d6a48e43
3 changed files with 6 additions and 10 deletions
  1. +1
    -1
      .github/workflows/build.yaml
  2. +3
    -2
      test.hxml
  3. +2
    -7
      test/TestAll.hx

+ 1
- 1
.github/workflows/build.yaml View File

@@ -31,7 +31,7 @@ jobs:
- name: Run tests
run: |
haxe test.hxml
npm run test
npm test
- name: Collect code coverage
env:
COVERALLS_REPO_TOKEN: ${{secrets.GITHUB_TOKEN}}


+ 3
- 2
test.hxml View File

@@ -3,8 +3,9 @@
--define js-es=6
--js var/tests.js
--library hxnodejs
--library mcover
--define coverage-lcov-reporter=var/lcov.info
--library instrument
--library thenshim
--library utest
--macro mcover.MCover.coverage([''], ['src'])
--macro instrument.Instrumentation.coverage(['setup_dart'], ['src'])
--main TestAll

+ 2
- 7
test/TestAll.hx View File

@@ -1,5 +1,4 @@
import mcover.coverage.MCoverage;
import mcover.coverage.client.LcovPrintClient;
import instrument.coverage.Coverage;
import setup_dart.*;
import utest.UTest;

@@ -12,9 +11,5 @@ class TestAll {
];

/** Application entry point. **/
static function main() UTest.run(tests, () -> {
final logger = MCoverage.getLogger();
logger.addClient(new LcovPrintClient("which", "var/lcov.info"));
logger.report();
});
static function main() UTest.run(tests, Coverage.endCoverage);
}

Loading…
Cancel
Save