@websolutespa/test 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.
- package/CHANGELOG.md +7 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +52 -0
- package/dist/index.mjs +58 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -4,5 +4,6 @@ declare const baseConfig: Config;
|
|
|
4
4
|
declare function getProjectConfig(): {};
|
|
5
5
|
declare function getAppConfig(): {};
|
|
6
6
|
declare function getPackageConfig(): {};
|
|
7
|
+
declare function getPayloadConfig(): {};
|
|
7
8
|
|
|
8
|
-
export { baseConfig, getAppConfig, getPackageConfig, getProjectConfig };
|
|
9
|
+
export { baseConfig, getAppConfig, getPackageConfig, getPayloadConfig, getProjectConfig };
|
package/dist/index.js
CHANGED
|
@@ -50,6 +50,7 @@ __export(test_exports, {
|
|
|
50
50
|
baseConfig: () => baseConfig,
|
|
51
51
|
getAppConfig: () => getAppConfig,
|
|
52
52
|
getPackageConfig: () => getPackageConfig,
|
|
53
|
+
getPayloadConfig: () => getPayloadConfig,
|
|
53
54
|
getProjectConfig: () => getProjectConfig
|
|
54
55
|
});
|
|
55
56
|
module.exports = __toCommonJS(test_exports);
|
|
@@ -198,10 +199,61 @@ function getPackageConfig() {
|
|
|
198
199
|
});
|
|
199
200
|
return config;
|
|
200
201
|
}
|
|
202
|
+
function getPayloadConfig() {
|
|
203
|
+
const cwd = process.cwd();
|
|
204
|
+
const config = __spreadProps(__spreadValues({}, baseConfig), {
|
|
205
|
+
testEnvironment: "node",
|
|
206
|
+
testTimeout: 2e4,
|
|
207
|
+
verbose: true,
|
|
208
|
+
silent: true,
|
|
209
|
+
rootDir: ".",
|
|
210
|
+
roots: [
|
|
211
|
+
`${cwd}`
|
|
212
|
+
],
|
|
213
|
+
modulePaths: [
|
|
214
|
+
`${cwd}/src/`
|
|
215
|
+
],
|
|
216
|
+
moduleDirectories: [
|
|
217
|
+
"node_modules"
|
|
218
|
+
],
|
|
219
|
+
testMatch: [
|
|
220
|
+
"<rootDir>/src/**/*(?<!e2e).test.{js,jsx,ts,tsx}"
|
|
221
|
+
],
|
|
222
|
+
coverageDirectory: `${cwd}/coverage`,
|
|
223
|
+
collectCoverageFrom: [
|
|
224
|
+
"<rootDir>/src/**/*(?<!test).{js,jsx,ts,tsx}"
|
|
225
|
+
],
|
|
226
|
+
reporters: ["default", "github-actions"],
|
|
227
|
+
coverageReporters: ["html", "text", "text-summary", "lcov"],
|
|
228
|
+
transform: {
|
|
229
|
+
"^.+\\.(js|jsx|ts|tsx)?$": ["@swc/jest", {
|
|
230
|
+
jsc: {
|
|
231
|
+
transform: {
|
|
232
|
+
react: {
|
|
233
|
+
runtime: "automatic"
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
}]
|
|
238
|
+
},
|
|
239
|
+
modulePathIgnorePatterns: [
|
|
240
|
+
"<rootDir>/build/"
|
|
241
|
+
],
|
|
242
|
+
transformIgnorePatterns: ["node_modules/(?!swiper)/"],
|
|
243
|
+
moduleNameMapper: {
|
|
244
|
+
// Force module uuid to resolve with the CJS entry point, because Jest does not support package.json.exports. See https://github.com/uuidjs/uuid/issues/451
|
|
245
|
+
"uuid": require.resolve("uuid"),
|
|
246
|
+
"\\.(css|scss)$": "identity-obj-proxy",
|
|
247
|
+
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/jest.mock.file.js"
|
|
248
|
+
}
|
|
249
|
+
});
|
|
250
|
+
return config;
|
|
251
|
+
}
|
|
201
252
|
// Annotate the CommonJS export names for ESM import in node:
|
|
202
253
|
0 && (module.exports = {
|
|
203
254
|
baseConfig,
|
|
204
255
|
getAppConfig,
|
|
205
256
|
getPackageConfig,
|
|
257
|
+
getPayloadConfig,
|
|
206
258
|
getProjectConfig
|
|
207
259
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -17,6 +17,13 @@ var __spreadValues = (a, b) => {
|
|
|
17
17
|
return a;
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
21
|
+
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
22
|
+
}) : x)(function(x) {
|
|
23
|
+
if (typeof require !== "undefined")
|
|
24
|
+
return require.apply(this, arguments);
|
|
25
|
+
throw new Error('Dynamic require of "' + x + '" is not supported');
|
|
26
|
+
});
|
|
20
27
|
|
|
21
28
|
// index.ts
|
|
22
29
|
import nextJest from "next/jest";
|
|
@@ -164,9 +171,60 @@ function getPackageConfig() {
|
|
|
164
171
|
});
|
|
165
172
|
return config;
|
|
166
173
|
}
|
|
174
|
+
function getPayloadConfig() {
|
|
175
|
+
const cwd = process.cwd();
|
|
176
|
+
const config = __spreadProps(__spreadValues({}, baseConfig), {
|
|
177
|
+
testEnvironment: "node",
|
|
178
|
+
testTimeout: 2e4,
|
|
179
|
+
verbose: true,
|
|
180
|
+
silent: true,
|
|
181
|
+
rootDir: ".",
|
|
182
|
+
roots: [
|
|
183
|
+
`${cwd}`
|
|
184
|
+
],
|
|
185
|
+
modulePaths: [
|
|
186
|
+
`${cwd}/src/`
|
|
187
|
+
],
|
|
188
|
+
moduleDirectories: [
|
|
189
|
+
"node_modules"
|
|
190
|
+
],
|
|
191
|
+
testMatch: [
|
|
192
|
+
"<rootDir>/src/**/*(?<!e2e).test.{js,jsx,ts,tsx}"
|
|
193
|
+
],
|
|
194
|
+
coverageDirectory: `${cwd}/coverage`,
|
|
195
|
+
collectCoverageFrom: [
|
|
196
|
+
"<rootDir>/src/**/*(?<!test).{js,jsx,ts,tsx}"
|
|
197
|
+
],
|
|
198
|
+
reporters: ["default", "github-actions"],
|
|
199
|
+
coverageReporters: ["html", "text", "text-summary", "lcov"],
|
|
200
|
+
transform: {
|
|
201
|
+
"^.+\\.(js|jsx|ts|tsx)?$": ["@swc/jest", {
|
|
202
|
+
jsc: {
|
|
203
|
+
transform: {
|
|
204
|
+
react: {
|
|
205
|
+
runtime: "automatic"
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
}]
|
|
210
|
+
},
|
|
211
|
+
modulePathIgnorePatterns: [
|
|
212
|
+
"<rootDir>/build/"
|
|
213
|
+
],
|
|
214
|
+
transformIgnorePatterns: ["node_modules/(?!swiper)/"],
|
|
215
|
+
moduleNameMapper: {
|
|
216
|
+
// Force module uuid to resolve with the CJS entry point, because Jest does not support package.json.exports. See https://github.com/uuidjs/uuid/issues/451
|
|
217
|
+
"uuid": __require.resolve("uuid"),
|
|
218
|
+
"\\.(css|scss)$": "identity-obj-proxy",
|
|
219
|
+
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/jest.mock.file.js"
|
|
220
|
+
}
|
|
221
|
+
});
|
|
222
|
+
return config;
|
|
223
|
+
}
|
|
167
224
|
export {
|
|
168
225
|
baseConfig,
|
|
169
226
|
getAppConfig,
|
|
170
227
|
getPackageConfig,
|
|
228
|
+
getPayloadConfig,
|
|
171
229
|
getProjectConfig
|
|
172
230
|
};
|