coverage.js 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.Coverage = void 0;
  6. /**
  7. * Copyright (c) Microsoft Corporation.
  8. *
  9. * Licensed under the Apache License, Version 2.0 (the "License");
  10. * you may not use this file except in compliance with the License.
  11. * You may obtain a copy of the License at
  12. *
  13. * http://www.apache.org/licenses/LICENSE-2.0
  14. *
  15. * Unless required by applicable law or agreed to in writing, software
  16. * distributed under the License is distributed on an "AS IS" BASIS,
  17. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  18. * See the License for the specific language governing permissions and
  19. * limitations under the License.
  20. */
  21. class Coverage {
  22. constructor(channel) {
  23. this._channel = void 0;
  24. this._channel = channel;
  25. }
  26. async startJSCoverage(options = {}) {
  27. await this._channel.startJSCoverage(options);
  28. }
  29. async stopJSCoverage() {
  30. return (await this._channel.stopJSCoverage()).entries;
  31. }
  32. async startCSSCoverage(options = {}) {
  33. await this._channel.startCSSCoverage(options);
  34. }
  35. async stopCSSCoverage() {
  36. return (await this._channel.stopCSSCoverage()).entries;
  37. }
  38. }
  39. exports.Coverage = Coverage;