@vyriy/jest-config 0.1.9

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Vyriy contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,63 @@
1
+ # @vyriy/jest-config
2
+
3
+ Shared Jest config for Vyriy projects.
4
+
5
+ ## Purpose
6
+
7
+ This package provides the base Jest setup used in Vyriy repositories for:
8
+
9
+ - TypeScript test runs
10
+ - SWC transforms
11
+ - JSDOM environment
12
+ - coverage defaults
13
+ - JUnit reporting
14
+
15
+ ## Install
16
+
17
+ With npm:
18
+
19
+ ```bash
20
+ npm install -D @vyriy/jest-config jest
21
+ ```
22
+
23
+ With Yarn:
24
+
25
+ ```bash
26
+ yarn add -D @vyriy/jest-config jest
27
+ ```
28
+
29
+ Install `jest` in the consumer project so CLI binaries are available.
30
+
31
+ ## Usage
32
+
33
+ Create `jest.config.mjs` in your project:
34
+
35
+ ```js
36
+ export { default } from '@vyriy/jest-config';
37
+ ```
38
+
39
+ If you need local overrides:
40
+
41
+ ```js
42
+ import baseConfig from '@vyriy/jest-config';
43
+
44
+ export default {
45
+ ...baseConfig,
46
+ coverageThreshold: {
47
+ global: {
48
+ branches: 80,
49
+ functions: 80,
50
+ lines: 80,
51
+ statements: 80,
52
+ },
53
+ },
54
+ };
55
+ ```
56
+
57
+ ## Current Vyriy Usage
58
+
59
+ In this repository the root Jest config is a thin wrapper:
60
+
61
+ ```js
62
+ export { default } from '@vyriy/jest-config';
63
+ ```
package/index.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ import type { Config } from 'jest';
2
+ declare const config: Config;
3
+ export default config;
package/index.js ADDED
@@ -0,0 +1,90 @@
1
+ const config = {
2
+ clearMocks: true,
3
+ collectCoverage: true,
4
+ collectCoverageFrom: [
5
+ '<rootDir>/packages/**/*.{ts,tsx}',
6
+ '<rootDir>/stack/*.ts',
7
+ '!<rootDir>/packages/**/*.d.ts',
8
+ '!<rootDir>/packages/**/index.{ts,tsx}',
9
+ '!<rootDir>/packages/**/*.stories.{ts,tsx}',
10
+ '!<rootDir>/packages/**/*.types.ts',
11
+ '!<rootDir>/packages/**/types.ts',
12
+ ],
13
+ coverageDirectory: 'coverage',
14
+ coveragePathIgnorePatterns: [
15
+ '/node_modules/',
16
+ ],
17
+ coverageProvider: 'v8',
18
+ coverageReporters: [
19
+ 'json',
20
+ 'text',
21
+ 'text-summary',
22
+ 'lcov',
23
+ 'clover',
24
+ 'cobertura',
25
+ ],
26
+ coverageThreshold: {
27
+ global: {
28
+ branches: 100,
29
+ functions: 100,
30
+ lines: 100,
31
+ statements: 100,
32
+ },
33
+ },
34
+ moduleFileExtensions: [
35
+ 'js',
36
+ 'mjs',
37
+ 'cjs',
38
+ 'jsx',
39
+ 'ts',
40
+ 'mts',
41
+ 'cts',
42
+ 'tsx',
43
+ 'json',
44
+ 'node',
45
+ ],
46
+ moduleNameMapper: {
47
+ '^(\\.{1,2}/.*)\\.js$': '$1',
48
+ '\\.(css|less|scss|sass|svg)$': 'identity-obj-proxy',
49
+ },
50
+ modulePathIgnorePatterns: [
51
+ '<rootDir>/dist',
52
+ ],
53
+ preset: 'ts-jest',
54
+ reporters: [
55
+ 'default',
56
+ [
57
+ 'jest-junit',
58
+ {
59
+ outputDirectory: 'coverage',
60
+ outputName: 'junit.xml',
61
+ },
62
+ ],
63
+ ],
64
+ resetMocks: false,
65
+ restoreMocks: true,
66
+ testEnvironment: 'jsdom',
67
+ testMatch: ['**/?(*.)+(spec|test).?([mc])[jt]s?(x)'],
68
+ testPathIgnorePatterns: [
69
+ '/node_modules/',
70
+ '<rootDir>/dist/',
71
+ ],
72
+ transform: {
73
+ '^.+\\.[tj]sx?$': [
74
+ '@swc/jest',
75
+ {
76
+ jsc: {
77
+ transform: {
78
+ react: {
79
+ runtime: 'automatic',
80
+ },
81
+ },
82
+ },
83
+ },
84
+ ],
85
+ },
86
+ transformIgnorePatterns: [
87
+ '/node_modules/',
88
+ ],
89
+ };
90
+ export default config;
package/package.json ADDED
@@ -0,0 +1,33 @@
1
+ {
2
+ "name": "@vyriy/jest-config",
3
+ "version": "0.1.9",
4
+ "description": "Shared Jest config for Vyriy projects",
5
+ "type": "module",
6
+ "main": "./index.js",
7
+ "dependencies": {
8
+ "@swc/jest": "^0.2.39",
9
+ "jest": "^30.4.2",
10
+ "jest-environment-jsdom": "^30.4.1",
11
+ "jest-junit": "^17.0.0",
12
+ "ts-jest": "^29.4.9"
13
+ },
14
+ "license": "MIT",
15
+ "types": "./index.d.ts",
16
+ "exports": {
17
+ ".": {
18
+ "types": "./index.d.ts",
19
+ "import": "./index.js",
20
+ "default": "./index.js"
21
+ },
22
+ "./index": {
23
+ "types": "./index.d.ts",
24
+ "import": "./index.js",
25
+ "default": "./index.js"
26
+ },
27
+ "./index.js": {
28
+ "types": "./index.d.ts",
29
+ "import": "./index.js",
30
+ "default": "./index.js"
31
+ }
32
+ }
33
+ }