@papillonarts/setup 0.43.0 → 0.45.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/jest/config.d.ts.map +1 -1
- package/build/jest/config.js +1 -1
- package/build/jest/setup.d.ts +1 -0
- package/build/jest/setup.d.ts.map +1 -1
- package/build/jest/setup.js +33 -7
- package/build/jest/utility.d.ts +2 -2
- package/build/jest/utility.d.ts.map +1 -1
- package/build/jest/utility.js +5 -3
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/jest/config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/jest/config.ts"],"names":[],"mappings":"AAsGA,eAAO,MAAM,uBAAuB,UAAyD,CAAA;AAE7F,wBAAgB,YAAY,CAAC,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,eAAe,EAAE,mBAAmB,EAAE,iBAAiB,EAAE;;;;;;CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4BlI"}
|
package/build/jest/config.js
CHANGED
|
@@ -11,7 +11,7 @@ var _jestConfig = require("jest-config");
|
|
|
11
11
|
// https://jestjs.io/docs/configuration
|
|
12
12
|
// https://jestjs.io/docs/getting-started#using-typescript
|
|
13
13
|
|
|
14
|
-
var transformIgnorePackages = ['bail', 'ccount', 'character-entities', 'character-entities-legacy', 'character-reference-invalid', 'comma-separated-tokens', 'decode-named-character-reference', 'devlop', 'escape-string-regexp', 'estree-util-is-identifier-name', 'hast-util-parse-selector', 'hast-util-to-jsx-runtime', 'hast-util-whitespace', 'hastscript', 'html-url-attributes', 'is-alphabetical', 'is-alphanumerical', 'is-blank', 'is-decimal', 'is-hexadecimal', 'is-plain-obj', 'is-whitespace-like', 'jsdom/node_modules/parse5', 'longest-streak', 'markdown-table', 'mdast-util-find-and-replace', 'mdast-util-find-and-replace/node_modules/escape-string-regexp', 'mdast-util-from-markdown', 'mdast-util-gfm', 'mdast-util-gfm-autolink-literal', 'mdast-util-gfm-footnote', 'mdast-util-gfm-strikethrough', 'mdast-util-gfm-table', 'mdast-util-gfm-task-list-item', 'mdast-util-mdx-expression', 'mdast-util-mdx-jsx', 'mdast-util-mdxjs-esm', 'mdast-util-phrasing', 'mdast-util-to-hast', 'mdast-util-to-markdown', 'mdast-util-to-string', 'micromark', 'micromark-core-commonmark', 'micromark-extension-gfm', 'micromark-extension-gfm-autolink-literal', 'micromark-extension-gfm-footnote', 'micromark-extension-gfm-strikethrough', 'micromark-extension-gfm-table', 'micromark-extension-gfm-tagfilter', 'micromark-extension-gfm-task-list-item', 'micromark-factory-destination', 'micromark-factory-label', 'micromark-factory-space', 'micromark-factory-title', 'micromark-factory-whitespace', 'micromark-util-character', 'micromark-util-chunked', 'micromark-util-classify-character', 'micromark-util-combine-extensions', 'micromark-util-decode-numeric-character-reference', 'micromark-util-decode-string', 'micromark-util-encode', 'micromark-util-html-tag-name', 'micromark-util-normalize-identifier', 'micromark-util-resolve-all', 'micromark-util-sanitize-uri', 'micromark-util-subtokenize', 'micromark-util-symbol', 'micromark-util-types', 'parse-entities', 'parse5', 'property-information', 'react-markdown', 'react-syntax-highlighter', 'refractor', 'remark-gfm', 'remark-parse', 'remark-rehype', 'remark-stringify', 'space-separated-tokens', 'trim-lines', 'trough', 'unified', 'unified/node_modules/is-plain-obj', 'unist-util-is', 'unist-util-position', 'unist-util-stringify-position', 'unist-util-visit', 'unist-util-visit-parents', 'uuid', 'vfile', 'vfile-message', 'zwitch'].join('|');
|
|
14
|
+
var transformIgnorePackages = ['@exodus', 'bail', 'ccount', 'character-entities', 'character-entities-legacy', 'character-reference-invalid', 'comma-separated-tokens', 'decode-named-character-reference', 'devlop', 'escape-string-regexp', 'estree-util-is-identifier-name', 'hast-util-parse-selector', 'hast-util-to-jsx-runtime', 'hast-util-whitespace', 'hastscript', 'html-url-attributes', 'is-alphabetical', 'is-alphanumerical', 'is-blank', 'is-decimal', 'is-hexadecimal', 'is-plain-obj', 'is-whitespace-like', 'jsdom/node_modules/parse5', 'longest-streak', 'markdown-table', 'mdast-util-find-and-replace', 'mdast-util-find-and-replace/node_modules/escape-string-regexp', 'mdast-util-from-markdown', 'mdast-util-gfm', 'mdast-util-gfm-autolink-literal', 'mdast-util-gfm-footnote', 'mdast-util-gfm-strikethrough', 'mdast-util-gfm-table', 'mdast-util-gfm-task-list-item', 'mdast-util-mdx-expression', 'mdast-util-mdx-jsx', 'mdast-util-mdxjs-esm', 'mdast-util-phrasing', 'mdast-util-to-hast', 'mdast-util-to-markdown', 'mdast-util-to-string', 'micromark', 'micromark-core-commonmark', 'micromark-extension-gfm', 'micromark-extension-gfm-autolink-literal', 'micromark-extension-gfm-footnote', 'micromark-extension-gfm-strikethrough', 'micromark-extension-gfm-table', 'micromark-extension-gfm-tagfilter', 'micromark-extension-gfm-task-list-item', 'micromark-factory-destination', 'micromark-factory-label', 'micromark-factory-space', 'micromark-factory-title', 'micromark-factory-whitespace', 'micromark-util-character', 'micromark-util-chunked', 'micromark-util-classify-character', 'micromark-util-combine-extensions', 'micromark-util-decode-numeric-character-reference', 'micromark-util-decode-string', 'micromark-util-encode', 'micromark-util-html-tag-name', 'micromark-util-normalize-identifier', 'micromark-util-resolve-all', 'micromark-util-sanitize-uri', 'micromark-util-subtokenize', 'micromark-util-symbol', 'micromark-util-types', 'parse-entities', 'parse5', 'property-information', 'react-markdown', 'react-syntax-highlighter', 'refractor', 'remark-gfm', 'remark-parse', 'remark-rehype', 'remark-stringify', 'space-separated-tokens', 'trim-lines', 'trough', 'unified', 'unified/node_modules/is-plain-obj', 'unist-util-is', 'unist-util-position', 'unist-util-stringify-position', 'unist-util-visit', 'unist-util-visit-parents', 'uuid', 'vfile', 'vfile-message', 'zwitch'].join('|');
|
|
15
15
|
var transformIgnorePatterns = exports.transformIgnorePatterns = ["node_modules/(?!((@)?".concat(transformIgnorePackages, ")/)")];
|
|
16
16
|
function getJestSetup(_ref) {
|
|
17
17
|
var testPathIgnorePatterns = _ref.testPathIgnorePatterns,
|
package/build/jest/setup.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../src/jest/setup.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../src/jest/setup.ts"],"names":[],"mappings":"AACA,OAAO,2BAA2B,CAAA;AAGlC,OAAO,uBAAuB,CAAA;AAG9B,wBAAgB,YAAY,SAoH3B"}
|
package/build/jest/setup.js
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
6
7
|
exports.runJestSetup = runJestSetup;
|
|
8
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
9
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
10
|
+
require("@testing-library/jest-dom");
|
|
7
11
|
var _react = require("@testing-library/react");
|
|
8
12
|
var _jestAxe = require("jest-axe");
|
|
9
13
|
require("jsdom-global/register");
|
|
@@ -93,13 +97,6 @@ function runJestSetup() {
|
|
|
93
97
|
}
|
|
94
98
|
return originalToLocaleTimeString.call(this, locale, options);
|
|
95
99
|
};
|
|
96
|
-
global.act = _react.act;
|
|
97
|
-
global.cleanup = _react.cleanup;
|
|
98
|
-
global.fireEvent = _react.fireEvent;
|
|
99
|
-
global.render = _react.render;
|
|
100
|
-
global.renderToJSON = function (component) {
|
|
101
|
-
return (0, _react.render)(component).container;
|
|
102
|
-
};
|
|
103
100
|
global.axe = (0, _jestAxe.configureAxe)({
|
|
104
101
|
rules: {
|
|
105
102
|
region: {
|
|
@@ -107,6 +104,35 @@ function runJestSetup() {
|
|
|
107
104
|
}
|
|
108
105
|
}
|
|
109
106
|
});
|
|
107
|
+
global.act = _react.act;
|
|
108
|
+
global.cleanup = _react.cleanup;
|
|
109
|
+
global.fireEvent = _react.fireEvent;
|
|
110
|
+
// Add MutationObserver polyfill for tests
|
|
111
|
+
global.MutationObserver = /*#__PURE__*/function () {
|
|
112
|
+
function _class(callback) {
|
|
113
|
+
(0, _classCallCheck2["default"])(this, _class);
|
|
114
|
+
this.callback = callback;
|
|
115
|
+
}
|
|
116
|
+
return (0, _createClass2["default"])(_class, [{
|
|
117
|
+
key: "disconnect",
|
|
118
|
+
value: function disconnect() {}
|
|
119
|
+
}, {
|
|
120
|
+
key: "observe",
|
|
121
|
+
value: function observe() {
|
|
122
|
+
// Call the callback immediately to simulate initial observation
|
|
123
|
+
this.callback([], this);
|
|
124
|
+
}
|
|
125
|
+
}, {
|
|
126
|
+
key: "takeRecords",
|
|
127
|
+
value: function takeRecords() {
|
|
128
|
+
return [];
|
|
129
|
+
}
|
|
130
|
+
}]);
|
|
131
|
+
}();
|
|
132
|
+
global.render = _react.render;
|
|
133
|
+
global.renderToJSON = function (component) {
|
|
134
|
+
return (0, _react.render)(component).container;
|
|
135
|
+
};
|
|
110
136
|
expect.extend(_jestAxe.toHaveNoViolations);
|
|
111
137
|
expect.extend({
|
|
112
138
|
toMatchDiffSnapshot: _snapshotDiff.toMatchDiffSnapshot
|
package/build/jest/utility.d.ts
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
* ```
|
|
22
22
|
*/
|
|
23
23
|
import type { ReactElement } from 'react';
|
|
24
|
-
export declare const renderSnapshot: (component: ReactElement) =>
|
|
24
|
+
export declare const renderSnapshot: (component: ReactElement) => void;
|
|
25
25
|
/**
|
|
26
26
|
* Renders an async component and matches it against a snapshot.
|
|
27
27
|
* Wraps the render in React's act() to ensure all updates are flushed.
|
|
@@ -39,7 +39,7 @@ export declare const renderSnapshot: (component: ReactElement) => any;
|
|
|
39
39
|
* })
|
|
40
40
|
* ```
|
|
41
41
|
*/
|
|
42
|
-
export declare const renderSnapshotAsync: (component: ReactElement | Promise<ReactElement>) => Promise<
|
|
42
|
+
export declare const renderSnapshotAsync: (component: ReactElement | Promise<ReactElement>) => Promise<void>;
|
|
43
43
|
/**
|
|
44
44
|
* Creates a mock store with default configuration.
|
|
45
45
|
* Useful for testing Redux-connected components.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utility.d.ts","sourceRoot":"","sources":["../../src/jest/utility.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH;;;;;;;;;;;;;;;GAeG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AAEzC,eAAO,MAAM,cAAc,GAAI,WAAW,YAAY,
|
|
1
|
+
{"version":3,"file":"utility.d.ts","sourceRoot":"","sources":["../../src/jest/utility.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH;;;;;;;;;;;;;;;GAeG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AAEzC,eAAO,MAAM,cAAc,GAAI,WAAW,YAAY,SAA6D,CAAA;AAEnH;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,mBAAmB,GAAU,WAAW,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC,kBACW,CAAA;AAEpG;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,eAAe,GAAI,iBAAiB,OAIhD,CAAA;AAED;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,OAAO,GAAU,WAAW,MAAM,OAAO,EAAE,gBAAc,EAAE,iBAAa,KAAG,OAAO,CAAC,IAAI,CASnG,CAAA"}
|
package/build/jest/utility.js
CHANGED
|
@@ -31,7 +31,7 @@ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/
|
|
|
31
31
|
*/
|
|
32
32
|
|
|
33
33
|
var renderSnapshot = exports.renderSnapshot = function renderSnapshot(component) {
|
|
34
|
-
return global.renderToJSON(component).toMatchSnapshot();
|
|
34
|
+
return expect(global.renderToJSON(component)).toMatchSnapshot();
|
|
35
35
|
};
|
|
36
36
|
|
|
37
37
|
/**
|
|
@@ -53,9 +53,11 @@ var renderSnapshot = exports.renderSnapshot = function renderSnapshot(component)
|
|
|
53
53
|
*/
|
|
54
54
|
var renderSnapshotAsync = exports.renderSnapshotAsync = /*#__PURE__*/function () {
|
|
55
55
|
var _ref = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee2(component) {
|
|
56
|
+
var _t2;
|
|
56
57
|
return _regenerator["default"].wrap(function (_context2) {
|
|
57
58
|
while (1) switch (_context2.prev = _context2.next) {
|
|
58
59
|
case 0:
|
|
60
|
+
_t2 = expect;
|
|
59
61
|
_context2.next = 1;
|
|
60
62
|
return global.act(/*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee() {
|
|
61
63
|
var _t;
|
|
@@ -72,10 +74,10 @@ var renderSnapshotAsync = exports.renderSnapshotAsync = /*#__PURE__*/function ()
|
|
|
72
74
|
return _context.stop();
|
|
73
75
|
}
|
|
74
76
|
}, _callee);
|
|
75
|
-
})))
|
|
77
|
+
})));
|
|
76
78
|
case 1:
|
|
77
79
|
_context2.next = 2;
|
|
78
|
-
return _context2.sent;
|
|
80
|
+
return _t2(_context2.sent).toMatchSnapshot();
|
|
79
81
|
case 2:
|
|
80
82
|
return _context2.abrupt("return", _context2.sent);
|
|
81
83
|
case 3:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@papillonarts/setup",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.45.0",
|
|
4
4
|
"description": "Papillon Arts Setup",
|
|
5
5
|
"homepage": "https://github.com/papillonarts/papillonarts/tree/master/packages/setup",
|
|
6
6
|
"repository": {
|
|
@@ -37,5 +37,5 @@
|
|
|
37
37
|
"build-acceptance": "npm run build",
|
|
38
38
|
"build-release": "npm run build"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "b632bc28824413203621efd72de2adcc04c094c8"
|
|
41
41
|
}
|