UNPKG

1.91 kBJavaScriptView Raw
1"use strict";
2
3var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4Object.defineProperty(exports, "__esModule", {
5 value: true
6});
7exports.waitForExpect = waitForExpect;
8var _waitForExpect2 = _interopRequireDefault(require("wait-for-expect"));
9/*
10 * The MIT License (MIT)
11 *
12 * Copyright (c) 2015 - present Instructure, Inc.
13 *
14 * Permission is hereby granted, free of charge, to any person obtaining a copy
15 * of this software and associated documentation files (the "Software"), to deal
16 * in the Software without restriction, including without limitation the rights
17 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
18 * copies of the Software, and to permit persons to whom the Software is
19 * furnished to do so, subject to the following conditions:
20 *
21 * The above copyright notice and this permission notice shall be included in all
22 * copies or substantial portions of the Software.
23 *
24 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
25 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
26 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
27 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
28 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
29 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
30 * SOFTWARE.
31 */
32
33function waitForExpect() {
34 let callback = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : () => {};
35 let _ref = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {},
36 _ref$timeout = _ref.timeout,
37 timeout = _ref$timeout === void 0 ? 1900 : _ref$timeout,
38 _ref$interval = _ref.interval,
39 interval = _ref$interval === void 0 ? 50 : _ref$interval;
40 return (0, _waitForExpect2.default)(callback, timeout, interval);
41}
\No newline at end of file