UNPKG

2.22 kBJavaScriptView Raw
1"use strict";
2
3var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
5Object.defineProperty(exports, "__esModule", {
6 value: true
7});
8exports.expect = void 0;
9
10var _chai = _interopRequireDefault(require("chai"));
11
12var _sinonChai = _interopRequireDefault(require("sinon-chai"));
13
14var _chaiString = _interopRequireDefault(require("chai-string"));
15
16var _chaiExclude = _interopRequireDefault(require("chai-exclude"));
17
18var _dirtyChai = _interopRequireDefault(require("dirty-chai"));
19
20var _chaiAsPromised = _interopRequireDefault(require("chai-as-promised"));
21
22var _assertions = _interopRequireDefault(require("./assertions"));
23
24/*
25 * The MIT License (MIT)
26 *
27 * Copyright (c) 2015 - present Instructure, Inc.
28 *
29 * Permission is hereby granted, free of charge, to any person obtaining a copy
30 * of this software and associated documentation files (the "Software"), to deal
31 * in the Software without restriction, including without limitation the rights
32 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
33 * copies of the Software, and to permit persons to whom the Software is
34 * furnished to do so, subject to the following conditions:
35 *
36 * The above copyright notice and this permission notice shall be included in all
37 * copies or substantial portions of the Software.
38 *
39 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
40 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
41 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
42 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
43 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
44 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
45 * SOFTWARE.
46 */
47const init = chai => {
48 // eslint-disable-next-line no-param-reassign
49 chai.config.truncateThreshold = 999;
50 chai.use(_sinonChai.default);
51 chai.use(_chaiExclude.default);
52 chai.use(_chaiString.default);
53 chai.use(_chaiAsPromised.default);
54 chai.use(_assertions.default);
55 chai.use(_dirtyChai.default);
56 return chai;
57};
58
59const expect = init(_chai.default).expect;
60exports.expect = expect;
\No newline at end of file