@testing-library/dom#configure JavaScript Examples

The following examples show how to use @testing-library/dom#configure. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: react.esm.js    From Path-Finding-Visualizer with MIT License 5 votes vote down vote up
/* eslint no-console:0 */

configure({
  asyncWrapper: function () {
    var _asyncWrapper = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(cb) {
      var result;
      return _regeneratorRuntime.wrap(function (_context2) {
        while (1) {
          switch (_context2.prev = _context2.next) {
            case 0:
              _context2.next = 2;
              return asyncAct( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
                return _regeneratorRuntime.wrap(function (_context) {
                  while (1) {
                    switch (_context.prev = _context.next) {
                      case 0:
                        _context.next = 2;
                        return cb();

                      case 2:
                        result = _context.sent;

                      case 3:
                      case "end":
                        return _context.stop();
                    }
                  }
                }, _callee);
              })));

            case 2:
              return _context2.abrupt("return", result);

            case 3:
            case "end":
              return _context2.stop();
          }
        }
      }, _callee2);
    }));

    return function asyncWrapper() {
      return _asyncWrapper.apply(this, arguments);
    };
  }()
});
Example #2
Source File: react.pure.esm.js    From Path-Finding-Visualizer with MIT License 5 votes vote down vote up
/* eslint no-console:0 */

configure({
  asyncWrapper: function () {
    var _asyncWrapper = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(cb) {
      var result;
      return _regeneratorRuntime.wrap(function (_context2) {
        while (1) {
          switch (_context2.prev = _context2.next) {
            case 0:
              _context2.next = 2;
              return asyncAct( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
                return _regeneratorRuntime.wrap(function (_context) {
                  while (1) {
                    switch (_context.prev = _context.next) {
                      case 0:
                        _context.next = 2;
                        return cb();

                      case 2:
                        result = _context.sent;

                      case 3:
                      case "end":
                        return _context.stop();
                    }
                  }
                }, _callee);
              })));

            case 2:
              return _context2.abrupt("return", result);

            case 3:
            case "end":
              return _context2.stop();
          }
        }
      }, _callee2);
    }));

    return function asyncWrapper() {
      return _asyncWrapper.apply(this, arguments);
    };
  }()
});
Example #3
Source File: react.esm.js    From VTour with MIT License 5 votes vote down vote up
/* eslint no-console:0 */

configure({
  asyncWrapper: function () {
    var _asyncWrapper = _asyncToGenerator(
    /*#__PURE__*/
    _regeneratorRuntime.mark(function _callee2(cb) {
      var result;
      return _regeneratorRuntime.wrap(function (_context2) {
        while (1) {
          switch (_context2.prev = _context2.next) {
            case 0:
              _context2.next = 2;
              return asyncAct(
              /*#__PURE__*/
              _asyncToGenerator(
              /*#__PURE__*/
              _regeneratorRuntime.mark(function _callee() {
                return _regeneratorRuntime.wrap(function (_context) {
                  while (1) {
                    switch (_context.prev = _context.next) {
                      case 0:
                        _context.next = 2;
                        return cb();

                      case 2:
                        result = _context.sent;

                      case 3:
                      case "end":
                        return _context.stop();
                    }
                  }
                }, _callee);
              })));

            case 2:
              return _context2.abrupt("return", result);

            case 3:
            case "end":
              return _context2.stop();
          }
        }
      }, _callee2);
    }));

    return function asyncWrapper() {
      return _asyncWrapper.apply(this, arguments);
    };
  }()
});
Example #4
Source File: react.pure.esm.js    From VTour with MIT License 5 votes vote down vote up
/* eslint no-console:0 */

configure({
  asyncWrapper: function () {
    var _asyncWrapper = _asyncToGenerator(
    /*#__PURE__*/
    _regeneratorRuntime.mark(function _callee2(cb) {
      var result;
      return _regeneratorRuntime.wrap(function (_context2) {
        while (1) {
          switch (_context2.prev = _context2.next) {
            case 0:
              _context2.next = 2;
              return asyncAct(
              /*#__PURE__*/
              _asyncToGenerator(
              /*#__PURE__*/
              _regeneratorRuntime.mark(function _callee() {
                return _regeneratorRuntime.wrap(function (_context) {
                  while (1) {
                    switch (_context.prev = _context.next) {
                      case 0:
                        _context.next = 2;
                        return cb();

                      case 2:
                        result = _context.sent;

                      case 3:
                      case "end":
                        return _context.stop();
                    }
                  }
                }, _callee);
              })));

            case 2:
              return _context2.abrupt("return", result);

            case 3:
            case "end":
              return _context2.stop();
          }
        }
      }, _callee2);
    }));

    return function asyncWrapper() {
      return _asyncWrapper.apply(this, arguments);
    };
  }()
});
Example #5
Source File: react.esm.js    From smart-contracts with MIT License 5 votes vote down vote up
configure({
  asyncWrapper: function () {
    var _asyncWrapper = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(cb) {
      var result;
      return _regeneratorRuntime.wrap(function _callee2$(_context2) {
        while (1) {
          switch (_context2.prev = _context2.next) {
            case 0:
              _context2.next = 2;
              return asyncAct( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
                return _regeneratorRuntime.wrap(function _callee$(_context) {
                  while (1) {
                    switch (_context.prev = _context.next) {
                      case 0:
                        _context.next = 2;
                        return cb();

                      case 2:
                        result = _context.sent;

                      case 3:
                      case "end":
                        return _context.stop();
                    }
                  }
                }, _callee);
              })));

            case 2:
              return _context2.abrupt("return", result);

            case 3:
            case "end":
              return _context2.stop();
          }
        }
      }, _callee2);
    }));

    function asyncWrapper(_x) {
      return _asyncWrapper.apply(this, arguments);
    }

    return asyncWrapper;
  }(),
  eventWrapper: function eventWrapper(cb) {
    var result;
    act(function () {
      result = cb();
    });
    return result;
  }
});
Example #6
Source File: react.pure.esm.js    From smart-contracts with MIT License 5 votes vote down vote up
configure({
  asyncWrapper: function () {
    var _asyncWrapper = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(cb) {
      var result;
      return _regeneratorRuntime.wrap(function _callee2$(_context2) {
        while (1) {
          switch (_context2.prev = _context2.next) {
            case 0:
              _context2.next = 2;
              return asyncAct( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
                return _regeneratorRuntime.wrap(function _callee$(_context) {
                  while (1) {
                    switch (_context.prev = _context.next) {
                      case 0:
                        _context.next = 2;
                        return cb();

                      case 2:
                        result = _context.sent;

                      case 3:
                      case "end":
                        return _context.stop();
                    }
                  }
                }, _callee);
              })));

            case 2:
              return _context2.abrupt("return", result);

            case 3:
            case "end":
              return _context2.stop();
          }
        }
      }, _callee2);
    }));

    function asyncWrapper(_x) {
      return _asyncWrapper.apply(this, arguments);
    }

    return asyncWrapper;
  }(),
  eventWrapper: function eventWrapper(cb) {
    var result;
    act(function () {
      result = cb();
    });
    return result;
  }
});
Example #7
Source File: react.esm.js    From spring-boot-ecommerce with Apache License 2.0 5 votes vote down vote up
/* eslint no-console:0 */

configure({
  asyncWrapper: function asyncWrapper(cb) {
    var result;
    return _regeneratorRuntime.async(function (_context2) {
      while (1) {
        switch (_context2.prev = _context2.next) {
          case 0:
            _context2.next = 2;
            return _regeneratorRuntime.awrap(asyncAct(function () {
              return _regeneratorRuntime.async(function (_context) {
                while (1) {
                  switch (_context.prev = _context.next) {
                    case 0:
                      _context.next = 2;
                      return _regeneratorRuntime.awrap(cb());

                    case 2:
                      result = _context.sent;

                    case 3:
                    case "end":
                      return _context.stop();
                  }
                }
              });
            }));

          case 2:
            return _context2.abrupt("return", result);

          case 3:
          case "end":
            return _context2.stop();
        }
      }
    });
  }
});
Example #8
Source File: react.pure.esm.js    From spring-boot-ecommerce with Apache License 2.0 5 votes vote down vote up
/* eslint no-console:0 */

configure({
  asyncWrapper: function asyncWrapper(cb) {
    var result;
    return _regeneratorRuntime.async(function (_context2) {
      while (1) {
        switch (_context2.prev = _context2.next) {
          case 0:
            _context2.next = 2;
            return _regeneratorRuntime.awrap(asyncAct(function () {
              return _regeneratorRuntime.async(function (_context) {
                while (1) {
                  switch (_context.prev = _context.next) {
                    case 0:
                      _context.next = 2;
                      return _regeneratorRuntime.awrap(cb());

                    case 2:
                      result = _context.sent;

                    case 3:
                    case "end":
                      return _context.stop();
                  }
                }
              });
            }));

          case 2:
            return _context2.abrupt("return", result);

          case 3:
          case "end":
            return _context2.stop();
        }
      }
    });
  }
});
Example #9
Source File: App.test.js    From jsonmatic with MIT License 5 votes vote down vote up
configure({ asyncUtilTimeout: 5000 });
Example #10
Source File: golbalTestsSetup.js    From jinabox.js with Apache License 2.0 5 votes vote down vote up
configure({ testIdAttribute: 'id' });