mirror of
https://github.com/maputnik/editor.git
synced 2025-12-26 08:00:01 +00:00
Fix coverage in tests.
This commit is contained in:
@@ -7,20 +7,18 @@ var COVERAGE_PATH = artifacts.pathSync("/coverage");
|
||||
|
||||
var coverage = istanbulCov.createCoverageMap({});
|
||||
|
||||
describe("coverage", function() {
|
||||
// Capture the coverage after each test
|
||||
afterEach(function() {
|
||||
// Code coverage
|
||||
var results = browser.execute(function() {
|
||||
return window.__coverage__;
|
||||
});
|
||||
// Capture the coverage after each test
|
||||
afterEach(function() {
|
||||
// Code coverage
|
||||
var results = browser.execute(function() {
|
||||
return window.__coverage__;
|
||||
});
|
||||
|
||||
coverage.merge(results.value);
|
||||
})
|
||||
|
||||
// Dump the coverage to a file
|
||||
after(function() {
|
||||
var jsonStr = JSON.stringify(coverage, null, 2);
|
||||
fs.writeFileSync(COVERAGE_PATH+"/coverage.json", jsonStr);
|
||||
})
|
||||
coverage.merge(results.value);
|
||||
})
|
||||
|
||||
// Dump the coverage to a file
|
||||
after(function() {
|
||||
var jsonStr = JSON.stringify(coverage, null, 2);
|
||||
fs.writeFileSync(COVERAGE_PATH+"/coverage.json", jsonStr);
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user