mirror of
https://github.com/a-nyx/maputnik-with-pmtiles.git
synced 2024-12-28 17:51:16 +01:00
ce731e7d6b
Also - Fixed screenshot tests - Fixed code coverage - Removed appveyor - Removed circleci - Updated wdio related dependencies - Added docker image deploy to the GitHub registry
26 lines
623 B
JavaScript
26 lines
623 B
JavaScript
var artifacts = require("../../artifacts");
|
|
var fs = require("fs");
|
|
var istanbulCov = require('istanbul-lib-coverage');
|
|
|
|
var COVERAGE_PATH = artifacts.pathSync("/coverage");
|
|
|
|
|
|
var coverage = istanbulCov.createCoverageMap({});
|
|
|
|
// Capture the coverage after each test
|
|
afterEach(function() {
|
|
// Code coverage
|
|
var results = browser.execute(function() {
|
|
return window.__coverage__;
|
|
});
|
|
|
|
if (results) {
|
|
coverage.merge(results);
|
|
}
|
|
})
|
|
|
|
// Dump the coverage to a file
|
|
after(function() {
|
|
var jsonStr = JSON.stringify(coverage, null, 2);
|
|
fs.writeFileSync(COVERAGE_PATH+"/coverage.json", jsonStr);
|
|
})
|