web 3d图形渲染器
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
633 B

  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.toHaveFocus = toHaveFocus;
  6. var _utils = require("./utils");
  7. function toHaveFocus(element) {
  8. (0, _utils.checkHtmlElement)(element, toHaveFocus, this);
  9. return {
  10. pass: element.ownerDocument.activeElement === element,
  11. message: () => {
  12. return [this.utils.matcherHint(`${this.isNot ? '.not' : ''}.toHaveFocus`, 'element', ''), '', 'Expected element with focus:', ` ${this.utils.printExpected(element)}`, 'Received element with focus:', ` ${this.utils.printReceived(element.ownerDocument.activeElement)}`].join('\n');
  13. }
  14. };
  15. }