@rstest/core 0.1.0 → 0.1.1

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.
@@ -0,0 +1,47 @@
1
+ /*
2
+ * @version 1.4.0
3
+ * @date 2015-10-26
4
+ * @stability 3 - Stable
5
+ * @author Lauri Rooden (https://github.com/litejs/natural-compare-lite)
6
+ * @license MIT License
7
+ */
8
+
9
+ /**
10
+ * @license React
11
+ * react-is.development.js
12
+ *
13
+ * Copyright (c) Facebook, Inc. and its affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */
18
+
19
+ /**
20
+ * @license React
21
+ * react-is.development.js
22
+ *
23
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
24
+ *
25
+ * This source code is licensed under the MIT license found in the
26
+ * LICENSE file in the root directory of this source tree.
27
+ */
28
+
29
+ /**
30
+ * @license React
31
+ * react-is.production.js
32
+ *
33
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
34
+ *
35
+ * This source code is licensed under the MIT license found in the
36
+ * LICENSE file in the root directory of this source tree.
37
+ */
38
+
39
+ /**
40
+ * @license React
41
+ * react-is.production.min.js
42
+ *
43
+ * Copyright (c) Facebook, Inc. and its affiliates.
44
+ *
45
+ * This source code is licensed under the MIT license found in the
46
+ * LICENSE file in the root directory of this source tree.
47
+ */
package/dist/285.js CHANGED
@@ -1,3 +1,5 @@
1
+ import 'module';
2
+ /*#__PURE__*/ import.meta.url;
1
3
  export const __webpack_ids__ = [
2
4
  "285"
3
5
  ];
@@ -6,7 +8,7 @@ export const __webpack_modules__ = {
6
8
  __webpack_require__.d(__webpack_exports__, {
7
9
  listTests: ()=>listTests
8
10
  });
9
- var node_fs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("node:fs");
11
+ var node_fs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("fs");
10
12
  var node_path__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("node:path");
11
13
  var _pool__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("./src/pool/index.ts");
12
14
  var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("./src/utils/index.ts");
package/dist/355.js CHANGED
@@ -1,3 +1,5 @@
1
+ import 'module';
2
+ /*#__PURE__*/ import.meta.url;
1
3
  export const __webpack_ids__ = [
2
4
  "355"
3
5
  ];
@@ -7,7 +9,7 @@ export const __webpack_modules__ = {
7
9
  parseErrorStacktrace: ()=>parseErrorStacktrace,
8
10
  printError: ()=>printError
9
11
  });
10
- var node_fs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("node:fs");
12
+ var node_fs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("fs");
11
13
  var _jridgewell_trace_mapping__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/.pnpm/@jridgewell+trace-mapping@0.3.29/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs");
12
14
  var stacktrace_parser__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/.pnpm/stacktrace-parser@0.1.11/node_modules/stacktrace-parser/dist/stack-trace-parser.esm.js");
13
15
  var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("./src/utils/index.ts");
@@ -1,5 +1,7 @@
1
+ import 'module';
2
+ /*#__PURE__*/ import.meta.url;
1
3
  export const __webpack_ids__ = [
2
- "950"
4
+ "359"
3
5
  ];
4
6
  export const __webpack_modules__ = {
5
7
  "../../node_modules/.pnpm/stacktrace-parser@0.1.11/node_modules/stacktrace-parser/dist/stack-trace-parser.esm.js": function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
@@ -99,10 +101,66 @@ export const __webpack_modules__ = {
99
101
  __webpack_require__.d(__webpack_exports__, {
100
102
  createRstest: ()=>createRstest
101
103
  });
102
- var manager_ = __webpack_require__("@vitest/snapshot/manager");
104
+ var external_pathe_ = __webpack_require__("pathe");
105
+ class SnapshotManager {
106
+ summary;
107
+ extension = ".snap";
108
+ constructor(options){
109
+ this.options = options;
110
+ this.clear();
111
+ }
112
+ clear() {
113
+ this.summary = emptySummary(this.options);
114
+ }
115
+ add(result) {
116
+ addSnapshotResult(this.summary, result);
117
+ }
118
+ resolvePath(testPath, context) {
119
+ const resolver = this.options.resolveSnapshotPath || (()=>(0, external_pathe_.join)((0, external_pathe_.join)((0, external_pathe_.dirname)(testPath), "__snapshots__"), `${(0, external_pathe_.basename)(testPath)}${this.extension}`));
120
+ const path = resolver(testPath, this.extension, context);
121
+ return path;
122
+ }
123
+ resolveRawPath(testPath, rawPath) {
124
+ return (0, external_pathe_.isAbsolute)(rawPath) ? rawPath : (0, external_pathe_.resolve)((0, external_pathe_.dirname)(testPath), rawPath);
125
+ }
126
+ }
127
+ function emptySummary(options) {
128
+ const summary = {
129
+ added: 0,
130
+ failure: false,
131
+ filesAdded: 0,
132
+ filesRemoved: 0,
133
+ filesRemovedList: [],
134
+ filesUnmatched: 0,
135
+ filesUpdated: 0,
136
+ matched: 0,
137
+ total: 0,
138
+ unchecked: 0,
139
+ uncheckedKeysByFile: [],
140
+ unmatched: 0,
141
+ updated: 0,
142
+ didUpdate: "all" === options.updateSnapshot
143
+ };
144
+ return summary;
145
+ }
146
+ function addSnapshotResult(summary, result) {
147
+ if (result.added) summary.filesAdded++;
148
+ if (result.fileDeleted) summary.filesRemoved++;
149
+ if (result.unmatched) summary.filesUnmatched++;
150
+ if (result.updated) summary.filesUpdated++;
151
+ summary.added += result.added;
152
+ summary.matched += result.matched;
153
+ summary.unchecked += result.unchecked;
154
+ if (result.uncheckedKeys && result.uncheckedKeys.length > 0) summary.uncheckedKeysByFile.push({
155
+ filePath: result.filepath,
156
+ keys: result.uncheckedKeys
157
+ });
158
+ summary.unmatched += result.unmatched;
159
+ summary.updated += result.updated;
160
+ summary.total += result.added + result.matched + result.unmatched + result.updated;
161
+ }
103
162
  var external_std_env_ = __webpack_require__("std-env");
104
163
  var src_config = __webpack_require__("./src/config.ts");
105
- var external_pathe_ = __webpack_require__("pathe");
106
164
  var stack_trace_parser_esm = __webpack_require__("../../node_modules/.pnpm/stacktrace-parser@0.1.11/node_modules/stacktrace-parser/dist/stack-trace-parser.esm.js");
107
165
  var utils = __webpack_require__("./src/utils/index.ts");
108
166
  var external_node_util_ = __webpack_require__("node:util");
@@ -518,12 +576,12 @@ export const __webpack_modules__ = {
518
576
  rootPath,
519
577
  config: rstestConfig
520
578
  }) : [];
521
- const snapshotManager = new manager_.SnapshotManager({
579
+ const snapshotManager = new SnapshotManager({
522
580
  updateSnapshot: rstestConfig.update ? 'all' : external_std_env_.isCI ? 'none' : 'new'
523
581
  });
524
582
  return {
525
583
  command,
526
- version: "0.1.0",
584
+ version: "0.1.1",
527
585
  rootPath,
528
586
  reporters,
529
587
  snapshotManager,
package/dist/44.js CHANGED
@@ -1,3 +1,5 @@
1
+ import 'module';
2
+ /*#__PURE__*/ import.meta.url;
1
3
  export const __webpack_ids__ = [
2
4
  "44"
3
5
  ];