@promoboxx/react-scripts-vite 0.1.10 → 0.1.13

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/dist/cli.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};
package/dist/cli.js ADDED
@@ -0,0 +1,41 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
4
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
5
+ if (ar || !(i in from)) {
6
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
7
+ ar[i] = from[i];
8
+ }
9
+ }
10
+ return to.concat(ar || Array.prototype.slice.call(from));
11
+ };
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ var child_process_1 = require("child_process");
14
+ var _a = process.argv,
15
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
16
+ _interpreter = _a[0],
17
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
18
+ _thisFile = _a[1], command = _a[2], args = _a.slice(3);
19
+ switch (command) {
20
+ case 'start':
21
+ (0, child_process_1.spawn)('./node_modules/.bin/vite', args, {
22
+ stdio: 'inherit',
23
+ // shell: true,
24
+ });
25
+ break;
26
+ case 'test':
27
+ (0, child_process_1.spawn)('./node_modules/.bin/vitest', args, {
28
+ stdio: 'inherit',
29
+ // shell: true,
30
+ });
31
+ break;
32
+ case 'build':
33
+ (0, child_process_1.spawn)('./node_modules/.bin/vite', __spreadArray(['build'], args, true), {
34
+ stdio: 'inherit',
35
+ // shell: true,
36
+ });
37
+ break;
38
+ default:
39
+ throw new Error("Unknown command: ".concat(command));
40
+ }
41
+ //# sourceMappingURL=cli.js.map
@@ -1,3 +1,2 @@
1
- import { UserConfig } from 'vite';
2
- declare const viteConfig: UserConfig;
3
- export default viteConfig;
1
+ declare const _default: import("vitest/dist/config").UserConfig;
2
+ export default _default;
@@ -3,38 +3,36 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- var plugin_react_refresh_1 = __importDefault(require("@vitejs/plugin-react-refresh"));
6
+ var plugin_react_1 = __importDefault(require("@vitejs/plugin-react"));
7
7
  var vite_plugin_checker_1 = __importDefault(require("vite-plugin-checker"));
8
8
  var vite_plugin_env_compatible_1 = __importDefault(require("vite-plugin-env-compatible"));
9
9
  var vite_plugin_svgr_1 = __importDefault(require("vite-plugin-svgr"));
10
- var vite_react_jsx_1 = __importDefault(require("vite-react-jsx"));
11
10
  var vite_tsconfig_paths_1 = __importDefault(require("vite-tsconfig-paths"));
12
- var viteConfig = {
11
+ var config_1 = require("vitest/config");
12
+ exports.default = (0, config_1.defineConfig)({
13
13
  build: {
14
- outDir: 'build',
14
+ outDir: 'dist',
15
15
  sourcemap: true,
16
16
  },
17
17
  plugins: [
18
18
  // React specific.
19
- plugin_react_refresh_1.default(),
20
- vite_plugin_svgr_1.default(),
21
- vite_react_jsx_1.default(),
19
+ // process.env.NODE_ENV !== 'test' && reactRefresh(),
20
+ (0, plugin_react_1.default)(),
21
+ (0, vite_plugin_svgr_1.default)(),
22
+ // reactJsx(),
22
23
  // import.meta.env -> process.env
23
- vite_plugin_env_compatible_1.default(),
24
+ (0, vite_plugin_env_compatible_1.default)(),
24
25
  // Support TypeScript paths.
25
- vite_tsconfig_paths_1.default(),
26
+ (0, vite_tsconfig_paths_1.default)(),
26
27
  // Check for issues.
27
- // TODO
28
- // https://github.com/fi3ework/vite-plugin-checker/issues/68
29
- vite_plugin_checker_1.default({
30
- eslint: {
31
- files: ['./src'],
32
- extensions: ['.js', '.jsx', '.ts', '.tsx', '.graphql'],
33
- // maxWarnings: process.env.CI === 'true' ? 0 : -1,
34
- },
35
- typescript: true,
36
- enableBuild: true,
37
- }),
28
+ process.env.NODE_ENV !== 'test' &&
29
+ (0, vite_plugin_checker_1.default)({
30
+ eslint: {
31
+ lintCommand: "eslint --max-warnings=".concat(process.env.CI === 'true' ? 0 : -1, " \"./src/**/*.{ts,tsx,js,jsx,mjs,cjs}\""),
32
+ },
33
+ typescript: true,
34
+ enableBuild: true,
35
+ }),
38
36
  ],
39
37
  resolve: {
40
38
  alias: {
@@ -43,6 +41,60 @@ var viteConfig = {
43
41
  '@material-ui/icons': '@material-ui/icons/esm',
44
42
  },
45
43
  },
46
- };
47
- exports.default = viteConfig;
44
+ test: {
45
+ globals: true,
46
+ environment: 'jsdom',
47
+ setupFiles: './src/test/setup.ts',
48
+ },
49
+ });
50
+ //
51
+ //
52
+ //
53
+ //
54
+ //
55
+ //
56
+ //
57
+ //
58
+ //
59
+ // import react from '@vitejs/plugin-react'
60
+ // import { UserConfig } from 'vite'
61
+ // import pluginChecker from 'vite-plugin-checker'
62
+ // import envCompatible from 'vite-plugin-env-compatible'
63
+ // import svgr from 'vite-plugin-svgr'
64
+ // import tsconfigPaths from 'vite-tsconfig-paths'
65
+ // const viteConfig: UserConfig = {
66
+ // build: {
67
+ // outDir: 'build',
68
+ // sourcemap: true,
69
+ // },
70
+ // plugins: [
71
+ // // React specific.
72
+ // react(),
73
+ // svgr(),
74
+ // // import.meta.env -> process.env
75
+ // envCompatible(),
76
+ // // Support TypeScript paths.
77
+ // tsconfigPaths(),
78
+ // // Check for issues.
79
+ // // TODO
80
+ // // https://github.com/fi3ework/vite-plugin-checker/issues/68
81
+ // pluginChecker({
82
+ // eslint: {
83
+ // lintCommand: `eslint --max-warnings=${
84
+ // process.env.CI === 'true' ? 0 : -1
85
+ // } "./src/**/*.{ts,tsx,js,jsx,mjs}"`,
86
+ // },
87
+ // typescript: true,
88
+ // enableBuild: true,
89
+ // }),
90
+ // ],
91
+ // resolve: {
92
+ // alias: {
93
+ // // This fixes weird styling issues with material-ui.
94
+ // '@material-ui/core': '@material-ui/core/esm',
95
+ // '@material-ui/icons': '@material-ui/icons/esm',
96
+ // },
97
+ // },
98
+ // }
99
+ // export default viteConfig
48
100
  //# sourceMappingURL=viteConfig.js.map
package/package.json CHANGED
@@ -1,53 +1,36 @@
1
1
  {
2
2
  "name": "@promoboxx/react-scripts-vite",
3
- "version": "0.1.10",
3
+ "version": "0.1.13",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
- "scripts": {
7
- "test": "echo \"Error: no test specified\" && exit 1"
8
- },
9
6
  "keywords": [],
7
+ "bin": {
8
+ "react-scripts": "./dist/cli.js",
9
+ "react-scripts-vite": "./dist/cli.js"
10
+ },
10
11
  "author": "",
11
12
  "license": "ISC",
12
13
  "devDependencies": {
13
14
  "@promoboxx/eslint-config": "^2.5.0",
14
- "@types/jest": "^27.0.1",
15
- "prettier": "^2.3.2",
16
- "typescript": "^4.3.5"
15
+ "prettier": "^2.5.1",
16
+ "typescript": "^4.5.5"
17
17
  },
18
18
  "dependencies": {
19
- "@babel/preset-env": "^7.15.0",
20
- "@babel/preset-react": "^7.14.5",
21
- "@babel/preset-typescript": "^7.15.0",
22
- "@vitejs/plugin-react-refresh": "^1.3.6",
23
- "babel-jest": "^27.0.6",
19
+ "@vitejs/plugin-react": "^1.2.0",
24
20
  "eslint": "^7.32.0",
25
- "jest": "^27.0.6",
26
- "jest-circus": "^27.0.6",
27
- "jest-watch-typeahead": "^0.6.4",
28
- "react-app-polyfill": "^2.0.0",
29
- "vite": "^2.5.0",
30
- "vite-plugin-checker": "^0.3.4",
31
- "vite-plugin-env-compatible": "^1.1.0",
32
- "vite-plugin-svgr": "^0.4.0",
33
- "vite-react-jsx": "^1.1.2",
34
- "vite-tsconfig-paths": "^3.3.13"
21
+ "jsdom": "^19.0.0",
22
+ "vite": "^2.8.4",
23
+ "vite-plugin-checker": "^0.4.2",
24
+ "vite-plugin-env-compatible": "^1.1.1",
25
+ "vite-plugin-svgr": "^1.0.1",
26
+ "vite-tsconfig-paths": "^3.4.1",
27
+ "vitest": "^0.5.5"
35
28
  },
36
29
  "files": [
30
+ "dist/cli.d.ts",
31
+ "dist/cli.js",
37
32
  "dist/index.d.ts",
38
33
  "dist/index.js",
39
- "dist/jest/babelTransform.d.ts",
40
- "dist/jest/babelTransform.js",
41
- "dist/jestConfig.d.ts",
42
- "dist/jestConfig.js",
43
- "dist/jest/cssTransform.d.ts",
44
- "dist/jest/cssTransform.js",
45
- "dist/jest/fileTransform.d.ts",
46
- "dist/jest/fileTransform.js",
47
- "dist/jest/pathsToModuleNameMapper.d.ts",
48
- "dist/jest/pathsToModuleNameMapper.js",
49
- "dist/readTypescriptConfig.d.ts",
50
- "dist/readTypescriptConfig.js",
51
34
  "dist/viteConfig.d.ts",
52
35
  "dist/viteConfig.js"
53
36
  ]
@@ -1,2 +0,0 @@
1
- declare const _default: import("@jest/transform").SyncTransformer<import("@babel/core").TransformOptions>;
2
- export default _default;
@@ -1,31 +0,0 @@
1
- "use strict";
2
- // https://github.com/facebook/create-react-app/blob/08dc7ab0f520f680b678556edeb702a5791af20e/packages/react-scripts/config/jest/babelTransform.js
3
- var __importDefault = (this && this.__importDefault) || function (mod) {
4
- return (mod && mod.__esModule) ? mod : { "default": mod };
5
- };
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- var babel_jest_1 = __importDefault(require("babel-jest"));
8
- // const hasJsxRuntime = (() => {
9
- // if (process.env.DISABLE_NEW_JSX_TRANSFORM === 'true') {
10
- // return false;
11
- // }
12
- // try {
13
- // require.resolve('react/jsx-runtime');
14
- // return true;
15
- // } catch (e) {
16
- // return false;
17
- // }
18
- // })();
19
- if (babel_jest_1.default.createTransformer == null) {
20
- throw new Error('createTransformer is undefined');
21
- }
22
- exports.default = babel_jest_1.default.createTransformer({
23
- presets: [
24
- ['@babel/preset-env', { targets: { node: 'current' } }],
25
- ['@babel/preset-typescript'],
26
- ['@babel/preset-react', { runtime: 'automatic' }],
27
- ],
28
- babelrc: false,
29
- configFile: false,
30
- });
31
- //# sourceMappingURL=babelTransform.js.map
@@ -1,5 +0,0 @@
1
- declare const cssTransform: {
2
- process(): string;
3
- getCacheKey(): string;
4
- };
5
- export default cssTransform;
@@ -1,13 +0,0 @@
1
- "use strict";
2
- // https://github.com/mikew/create-react-app/blob/v4.0.3-tsc/packages/react-scripts/config/jest/cssTransform.js
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- var cssTransform = {
5
- process: function () {
6
- return 'module.exports = {};';
7
- },
8
- getCacheKey: function () {
9
- return 'cssTransform';
10
- },
11
- };
12
- exports.default = cssTransform;
13
- //# sourceMappingURL=cssTransform.js.map
@@ -1,4 +0,0 @@
1
- declare const fileTransform: {
2
- process(src: string, filename: string): string;
3
- };
4
- export default fileTransform;
@@ -1,26 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- var path_1 = __importDefault(require("path"));
7
- var camelcase_1 = __importDefault(require("camelcase"));
8
- // This is a custom Jest transformer turning file imports into filenames.
9
- // http://facebook.github.io/jest/docs/en/webpack.html
10
- var fileTransform = {
11
- process: function (src, filename) {
12
- var assetFilename = JSON.stringify(path_1.default.basename(filename));
13
- if (filename.match(/\.svg$/)) {
14
- // Based on how SVGR generates a component name:
15
- // https://github.com/smooth-code/svgr/blob/01b194cf967347d43d4cbe6b434404731b87cf27/packages/core/src/state.js#L6
16
- var pascalCaseFilename = camelcase_1.default(path_1.default.parse(filename).name, {
17
- pascalCase: true,
18
- });
19
- var componentName = "Svg" + pascalCaseFilename;
20
- return "const React = require('react');\n module.exports = {\n __esModule: true,\n default: " + assetFilename + ",\n ReactComponent: React.forwardRef(function " + componentName + "(props, ref) {\n return {\n $$typeof: Symbol.for('react.element'),\n type: 'svg',\n ref: ref,\n key: null,\n props: Object.assign({}, props, {\n children: " + assetFilename + "\n })\n };\n }),\n };";
21
- }
22
- return "module.exports = " + assetFilename + ";";
23
- },
24
- };
25
- exports.default = fileTransform;
26
- //# sourceMappingURL=fileTransform.js.map
@@ -1,6 +0,0 @@
1
- import type { Config } from '@jest/types';
2
- declare type JestPathMapping = Config.InitialOptions['moduleNameMapper'];
3
- export declare const pathsToModuleNameMapper: (mapping: import("typescript").MapLike<string[]>, { prefix }?: {
4
- prefix: string;
5
- }) => JestPathMapping;
6
- export {};
@@ -1,49 +0,0 @@
1
- "use strict";
2
- // https://github.com/kulshekhar/ts-jest/blob/42ff5e469fb5d315b92e85eee105e5a040949c01/src/config/paths-to-module-name-mapper.ts
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.pathsToModuleNameMapper = void 0;
5
- // we don't need to escape all chars, so commented out is the real one
6
- // const escapeRegex = (str: string) => str.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&')
7
- var escapeRegex = function (str) { return str.replace(/[-\\^$*+?.()|[\]{}]/g, '\\$&'); };
8
- // const logger = rootLogger.child({ [LogContexts.namespace]: 'path-mapper' })
9
- var pathsToModuleNameMapper = function (mapping, _a) {
10
- var _b = _a === void 0 ? Object.create(null) : _a, _c = _b.prefix, prefix = _c === void 0 ? '' : _c;
11
- var jestMap = {};
12
- for (var _i = 0, _d = Object.keys(mapping); _i < _d.length; _i++) {
13
- var fromPath = _d[_i];
14
- var pattern = void 0;
15
- var toPaths = mapping[fromPath];
16
- // check that we have only one target path
17
- if (toPaths.length === 0) {
18
- // logger.warn(interpolate(Errors.NotMappingPathWithEmptyMap, { path: fromPath }))
19
- continue;
20
- }
21
- // split with '*'
22
- var segments = fromPath.split(/\*/g);
23
- if (segments.length === 1) {
24
- var paths = toPaths.map(function (target) {
25
- var enrichedPrefix = prefix !== '' && !prefix.endsWith('/') ? prefix + "/" : prefix;
26
- return "" + enrichedPrefix + target;
27
- });
28
- pattern = "^" + escapeRegex(fromPath) + "$";
29
- jestMap[pattern] = paths.length === 1 ? paths[0] : paths;
30
- }
31
- else if (segments.length === 2) {
32
- var paths = toPaths.map(function (target) {
33
- var enrichedTarget = target.startsWith('./') && prefix !== ''
34
- ? target.substring(target.indexOf('/') + 1)
35
- : target;
36
- var enrichedPrefix = prefix !== '' && !prefix.endsWith('/') ? prefix + "/" : prefix;
37
- return "" + enrichedPrefix + enrichedTarget.replace(/\*/g, '$1');
38
- });
39
- pattern = "^" + escapeRegex(segments[0]) + "(.*)" + escapeRegex(segments[1]) + "$";
40
- jestMap[pattern] = paths.length === 1 ? paths[0] : paths;
41
- }
42
- else {
43
- // logger.warn(interpolate(Errors.NotMappingMultiStarPath, { path: fromPath }))
44
- }
45
- }
46
- return jestMap;
47
- };
48
- exports.pathsToModuleNameMapper = pathsToModuleNameMapper;
49
- //# sourceMappingURL=pathsToModuleNameMapper.js.map
@@ -1,26 +0,0 @@
1
- declare const jestConfig: {
2
- clearMocks: boolean;
3
- collectCoverageFrom: string[];
4
- coverageProvider: string;
5
- moduleFileExtensions: string[];
6
- moduleNameMapper: {
7
- '^react-native$': string;
8
- '^.+\\.module\\.(css|sass|scss)$': string;
9
- };
10
- resetMocks: boolean;
11
- roots: string[];
12
- setupFiles: string[];
13
- setupFilesAfterEnv: string[];
14
- testEnvironment: string;
15
- testMatch: string[];
16
- testRunner: string;
17
- transform: {
18
- '\\.[jt]sx?$': string;
19
- '^.+\\.css$': string;
20
- '^(?!.*\\.(js|jsx|mjs|cjs|ts|tsx|css|json)$)': string;
21
- };
22
- transformIgnorePatterns: string[];
23
- verbose: boolean;
24
- watchPlugins: string[];
25
- };
26
- export default jestConfig;
@@ -1,170 +0,0 @@
1
- "use strict";
2
- var __assign = (this && this.__assign) || function () {
3
- __assign = Object.assign || function(t) {
4
- for (var s, i = 1, n = arguments.length; i < n; i++) {
5
- s = arguments[i];
6
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
- t[p] = s[p];
8
- }
9
- return t;
10
- };
11
- return __assign.apply(this, arguments);
12
- };
13
- var __importDefault = (this && this.__importDefault) || function (mod) {
14
- return (mod && mod.__esModule) ? mod : { "default": mod };
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- var pathsToModuleNameMapper_1 = require("./jest/pathsToModuleNameMapper");
18
- var readTypescriptConfig_1 = __importDefault(require("./readTypescriptConfig"));
19
- var typescriptConfig = readTypescriptConfig_1.default();
20
- var jestConfig = {
21
- // All imported modules in your tests should be mocked automatically
22
- // automock: false,
23
- // Stop running tests after `n` failures
24
- // bail: 0,
25
- // The directory where Jest should store its cached dependency information
26
- // cacheDirectory: "/tmp/jest_rs",
27
- // Automatically clear mock calls and instances between every test
28
- clearMocks: true,
29
- // Indicates whether the coverage information should be collected while executing the test
30
- // collectCoverage: false,
31
- // An array of glob patterns indicating a set of files for which coverage information should be collected
32
- collectCoverageFrom: ['src/**/*.{js,jsx,ts,tsx}', '!src/**/*.d.ts'],
33
- // The directory where Jest should output its coverage files
34
- // coverageDirectory: undefined,
35
- // An array of regexp pattern strings used to skip coverage collection
36
- // coveragePathIgnorePatterns: [
37
- // "/node_modules/"
38
- // ],
39
- // Indicates which provider should be used to instrument code for coverage
40
- coverageProvider: 'v8',
41
- // A list of reporter names that Jest uses when writing coverage reports
42
- // coverageReporters: [
43
- // "json",
44
- // "text",
45
- // "lcov",
46
- // "clover"
47
- // ],
48
- // An object that configures minimum threshold enforcement for coverage results
49
- // coverageThreshold: undefined,
50
- // A path to a custom dependency extractor
51
- // dependencyExtractor: undefined,
52
- // Make calling deprecated APIs throw helpful error messages
53
- // errorOnDeprecated: false,
54
- // Force coverage collection from ignored files using an array of glob patterns
55
- // forceCoverageMatch: [],
56
- // A path to a module which exports an async function that is triggered once before all test suites
57
- // globalSetup: undefined,
58
- // A path to a module which exports an async function that is triggered once after all test suites
59
- // globalTeardown: undefined,
60
- // A set of global variables that need to be available in all test environments
61
- // globals: {},
62
- // The maximum amount of workers used to run your tests. Can be specified as % or a number. E.g. maxWorkers: 10% will use 10% of your CPU amount + 1 as the maximum worker number. maxWorkers: 2 will use a maximum of 2 workers.
63
- // maxWorkers: "50%",
64
- // An array of directory names to be searched recursively up from the requiring module's location
65
- // moduleDirectories: [
66
- // "node_modules"
67
- // ],
68
- // An array of file extensions your modules use
69
- moduleFileExtensions: [
70
- 'web.js',
71
- 'js',
72
- 'web.ts',
73
- 'ts',
74
- 'web.tsx',
75
- 'tsx',
76
- 'json',
77
- 'web.jsx',
78
- 'jsx',
79
- 'node',
80
- 'd.ts',
81
- ],
82
- // A map from regular expressions to module names or to arrays of module names that allow to stub out resources with a single module
83
- moduleNameMapper: __assign(__assign({}, pathsToModuleNameMapper_1.pathsToModuleNameMapper(typescriptConfig.options.paths || {}, {
84
- prefix: '<rootDir>/',
85
- })), { '^react-native$': 'react-native-web', '^.+\\.module\\.(css|sass|scss)$': 'identity-obj-proxy' }),
86
- // An array of regexp pattern strings, matched against all module paths before considered 'visible' to the module loader
87
- // modulePathIgnorePatterns: [],
88
- // Activates notifications for test results
89
- // notify: false,
90
- // An enum that specifies notification mode. Requires { notify: true }
91
- // notifyMode: "failure-change",
92
- // A preset that is used as a base for Jest's configuration
93
- // preset: 'ts-jest/presets/js-with-ts',
94
- // Run tests from one or more projects
95
- // projects: undefined,
96
- // Use this configuration option to add custom reporters to Jest
97
- // reporters: undefined,
98
- // Automatically reset mock state between every test
99
- resetMocks: true,
100
- // Reset the module registry before running each individual test
101
- // resetModules: false,
102
- // A path to a custom resolver
103
- // resolver: undefined,
104
- // Automatically restore mock state between every test
105
- // restoreMocks: false,
106
- // The root directory that Jest should scan for tests and modules within
107
- // rootDir: undefined,
108
- // A list of paths to directories that Jest should use to search for files in
109
- roots: ['<rootDir>/src'],
110
- // Allows you to use a custom runner instead of Jest's default test runner
111
- // runner: "jest-runner",
112
- // The paths to modules that run some code to configure or set up the testing environment before each test
113
- setupFiles: [require.resolve('react-app-polyfill/jsdom')],
114
- // A list of paths to modules that run some code to configure or set up the testing framework before each test
115
- setupFilesAfterEnv: ['<rootDir>/src/setupTests.ts'],
116
- // The number of seconds after which a test is considered as slow and reported as such in the results.
117
- // slowTestThreshold: 5,
118
- // A list of paths to snapshot serializer modules Jest should use for snapshot testing
119
- // snapshotSerializers: [],
120
- // The test environment that will be used for testing
121
- testEnvironment: 'jest-environment-jsdom',
122
- // Options that will be passed to the testEnvironment
123
- // testEnvironmentOptions: {},
124
- // Adds a location field to test results
125
- // testLocationInResults: false,
126
- // The glob patterns Jest uses to detect test files
127
- testMatch: [
128
- '<rootDir>/src/**/__tests__/**/*.{js,jsx,ts,tsx}',
129
- '<rootDir>/src/**/*.{spec,test}.{js,jsx,ts,tsx}',
130
- ],
131
- // An array of regexp pattern strings that are matched against all test paths, matched tests are skipped
132
- // testPathIgnorePatterns: [
133
- // "/node_modules/"
134
- // ],
135
- // The regexp pattern or array of patterns that Jest uses to detect test files
136
- // testRegex: [],
137
- // This option allows the use of a custom results processor
138
- // testResultsProcessor: undefined,
139
- // This option allows use of a custom test runner
140
- testRunner: require.resolve('jest-circus/runner'),
141
- // This option sets the URL for the jsdom environment. It is reflected in properties such as location.href
142
- // testURL: "http://localhost",
143
- // Setting this value to "fake" allows the use of fake timers for functions such as "setTimeout"
144
- // timers: "real",
145
- // A map from regular expressions to paths to transformers
146
- transform: {
147
- '\\.[jt]sx?$': require.resolve('./jest/babelTransform'),
148
- '^.+\\.css$': require.resolve('./jest/cssTransform'),
149
- '^(?!.*\\.(js|jsx|mjs|cjs|ts|tsx|css|json)$)': require.resolve('./jest/fileTransform'),
150
- },
151
- // An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation
152
- transformIgnorePatterns: [
153
- '[/\\\\]node_modules[/\\\\].+\\.(js|jsx|mjs|cjs|ts|tsx)$',
154
- '^.+\\.module\\.(css|sass|scss)$',
155
- ],
156
- // An array of regexp pattern strings that are matched against all modules before the module loader will automatically return a mock for them
157
- // unmockedModulePathPatterns: undefined,
158
- // Indicates whether each individual test should be reported during the run
159
- verbose: true,
160
- // An array of regexp patterns that are matched against all source file paths before re-running tests in watch mode
161
- // watchPathIgnorePatterns: [],
162
- watchPlugins: [
163
- 'jest-watch-typeahead/filename',
164
- 'jest-watch-typeahead/testname',
165
- ],
166
- // Whether to use watchman for file crawling
167
- // watchman: true,
168
- };
169
- exports.default = jestConfig;
170
- //# sourceMappingURL=jestConfig.js.map
@@ -1,3 +0,0 @@
1
- import type { ParsedCommandLine } from 'typescript';
2
- declare function readTypescriptConfig(): ParsedCommandLine;
3
- export default readTypescriptConfig;
@@ -1,16 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- var existingConfig;
4
- function readTypescriptConfig() {
5
- if (existingConfig == null) {
6
- var typescriptCompilerPath = require.resolve('typescript');
7
- var typescript = require(typescriptCompilerPath);
8
- existingConfig = typescript.getParsedCommandLineOfConfigFile('./tsconfig.json', undefined, typescript.sys);
9
- }
10
- if (existingConfig == null) {
11
- throw new Error('could not read tsconfig.json');
12
- }
13
- return existingConfig;
14
- }
15
- exports.default = readTypescriptConfig;
16
- //# sourceMappingURL=readTypescriptConfig.js.map