Skip to content

Commit

Permalink
Merge pull request #662 from gemini-testing/fix/rm.coverage
Browse files Browse the repository at this point in the history
chore: remove outdated coverage stuff
  • Loading branch information
j0tunn authored Sep 23, 2022
2 parents 278e237 + 5a67ba0 commit 7120926
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 133 deletions.
108 changes: 0 additions & 108 deletions lib/core/browser/client-scripts/index.coverage.js

This file was deleted.

6 changes: 0 additions & 6 deletions lib/core/browser/client-scripts/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ function prepareScreenshotUnsafe(areas, opts) {
viewportWidth = document.documentElement.clientWidth,
documentHeight = document.documentElement.scrollHeight,
documentWidth = document.documentElement.scrollWidth,
coverage,
viewPort = new Rect({
left: util.getScrollLeft(scrollElem),
top: util.getScrollTop(scrollElem),
Expand All @@ -94,10 +93,6 @@ function prepareScreenshotUnsafe(areas, opts) {
};
}

if (opts.coverage) {
coverage = require('./index.coverage').collectCoverage(rect);
}

return {
captureArea: rect.serialize(),
ignoreAreas: findIgnoreAreas(opts.ignoreSelectors, scrollElem),
Expand All @@ -109,7 +104,6 @@ function prepareScreenshotUnsafe(areas, opts) {
},
documentHeight: Math.round(documentHeight),
documentWidth: Math.round(documentWidth),
coverage: coverage,
canHaveCaret: isEditable(document.activeElement),
pixelRatio: pixelRatio
};
Expand Down
4 changes: 0 additions & 4 deletions lib/core/client-bridge/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ exports.build = (browser, opts = {}) => {
basedir: path.join(__dirname, '..', 'browser', 'client-scripts')
});

if (!opts.coverage) {
script.exclude('./index.coverage');
}

script.transform({
sourcemap: false,
global: true,
Expand Down
15 changes: 0 additions & 15 deletions test/lib/core/client-bridge/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,6 @@ describe('clientBridge', () => {
.then(() => assert.calledOnceWith(browserify, sinon.match({entries: './index', basedir: sinon.match(/browser\/client-scripts/)})));
});

it('should exclude coverage client script if coverage is disabled', () => {
return clientBridge.build(null, {coverage: false})
.then(() => assert.calledOnceWith(script.exclude, './index.coverage'));
});

it('should not exclude coverage client script if coverage is enabled', () => {
return clientBridge.build(null, {coverage: true})
.then(() => assert.notCalled(script.exclude));
});

it('should transform client scripts', () => {
return clientBridge.build()
.then(() => {
Expand All @@ -53,11 +43,6 @@ describe('clientBridge', () => {
});
});

it('should transform client scripts after excluding of a coverage client script', () => {
return clientBridge.build(null, {coverage: false})
.then(() => assert.callOrder(script.exclude, script.transform));
});

it('should transform client scripts using native library', () => {
return clientBridge.build(null, {calibration: {needsCompatLib: false}})
.then(() => {
Expand Down

0 comments on commit 7120926

Please sign in to comment.