Добавление прогона тестов для ПРов (#25)
This commit is contained in:
132
jest.config.js
132
jest.config.js
@ -4,33 +4,33 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
// All imported modules in your tests should be mocked automatically
|
// All imported modules in your tests should be mocked automatically
|
||||||
// automock: false,
|
// automock: false,
|
||||||
|
|
||||||
// Stop running tests after `n` failures
|
// Stop running tests after `n` failures
|
||||||
// bail: 0,
|
// bail: 0,
|
||||||
|
|
||||||
// The directory where Jest should store its cached dependency information
|
// The directory where Jest should store its cached dependency information
|
||||||
// cacheDirectory: "/private/var/folders/95/rl6ym4qj7vg7y7myqqlvjzzn4q2cvt/T/jest_kdlda2",
|
// cacheDirectory: "/private/var/folders/95/rl6ym4qj7vg7y7myqqlvjzzn4q2cvt/T/jest_kdlda2",
|
||||||
|
|
||||||
// Automatically clear mock calls and instances between every test
|
// Automatically clear mock calls and instances between every test
|
||||||
clearMocks: true,
|
clearMocks: true,
|
||||||
|
|
||||||
// Indicates whether the coverage information should be collected while executing the test
|
// Indicates whether the coverage information should be collected while executing the test
|
||||||
// collectCoverage: false,
|
// collectCoverage: false,
|
||||||
|
|
||||||
// An array of glob patterns indicating a set of files for which coverage information should be collected
|
// An array of glob patterns indicating a set of files for which coverage information should be collected
|
||||||
// collectCoverageFrom: undefined,
|
// collectCoverageFrom: undefined,
|
||||||
|
|
||||||
// The directory where Jest should output its coverage files
|
// The directory where Jest should output its coverage files
|
||||||
// coverageDirectory: undefined,
|
// coverageDirectory: undefined,
|
||||||
|
|
||||||
// An array of regexp pattern strings used to skip coverage collection
|
// An array of regexp pattern strings used to skip coverage collection
|
||||||
// coveragePathIgnorePatterns: [
|
// coveragePathIgnorePatterns: [
|
||||||
// "/node_modules/"
|
// "/node_modules/"
|
||||||
// ],
|
// ],
|
||||||
|
|
||||||
// Indicates which provider should be used to instrument code for coverage
|
// Indicates which provider should be used to instrument code for coverage
|
||||||
// coverageProvider: "babel",
|
// coverageProvider: "babel",
|
||||||
|
|
||||||
// A list of reporter names that Jest uses when writing coverage reports
|
// A list of reporter names that Jest uses when writing coverage reports
|
||||||
// coverageReporters: [
|
// coverageReporters: [
|
||||||
// "json",
|
// "json",
|
||||||
@ -38,36 +38,36 @@ module.exports = {
|
|||||||
// "lcov",
|
// "lcov",
|
||||||
// "clover"
|
// "clover"
|
||||||
// ],
|
// ],
|
||||||
|
|
||||||
// An object that configures minimum threshold enforcement for coverage results
|
// An object that configures minimum threshold enforcement for coverage results
|
||||||
// coverageThreshold: undefined,
|
// coverageThreshold: undefined,
|
||||||
|
|
||||||
// A path to a custom dependency extractor
|
// A path to a custom dependency extractor
|
||||||
// dependencyExtractor: undefined,
|
// dependencyExtractor: undefined,
|
||||||
|
|
||||||
// Make calling deprecated APIs throw helpful error messages
|
// Make calling deprecated APIs throw helpful error messages
|
||||||
// errorOnDeprecated: false,
|
// errorOnDeprecated: false,
|
||||||
|
|
||||||
// Force coverage collection from ignored files using an array of glob patterns
|
// Force coverage collection from ignored files using an array of glob patterns
|
||||||
// forceCoverageMatch: [],
|
// forceCoverageMatch: [],
|
||||||
|
|
||||||
// A path to a module which exports an async function that is triggered once before all test suites
|
// A path to a module which exports an async function that is triggered once before all test suites
|
||||||
// globalSetup: undefined,
|
// globalSetup: undefined,
|
||||||
|
|
||||||
// A path to a module which exports an async function that is triggered once after all test suites
|
// A path to a module which exports an async function that is triggered once after all test suites
|
||||||
// globalTeardown: undefined,
|
// globalTeardown: undefined,
|
||||||
|
|
||||||
// A set of global variables that need to be available in all test environments
|
// A set of global variables that need to be available in all test environments
|
||||||
// globals: {},
|
// globals: {},
|
||||||
|
|
||||||
// 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.
|
// 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.
|
||||||
// maxWorkers: "50%",
|
// maxWorkers: "50%",
|
||||||
|
|
||||||
// An array of directory names to be searched recursively up from the requiring module's location
|
// An array of directory names to be searched recursively up from the requiring module's location
|
||||||
// moduleDirectories: [
|
// moduleDirectories: [
|
||||||
// "node_modules"
|
// "node_modules"
|
||||||
// ],
|
// ],
|
||||||
|
|
||||||
// An array of file extensions your modules use
|
// An array of file extensions your modules use
|
||||||
// moduleFileExtensions: [
|
// moduleFileExtensions: [
|
||||||
// "js",
|
// "js",
|
||||||
@ -77,113 +77,121 @@ module.exports = {
|
|||||||
// "tsx",
|
// "tsx",
|
||||||
// "node"
|
// "node"
|
||||||
// ],
|
// ],
|
||||||
|
|
||||||
// A map from regular expressions to module names or to arrays of module names that allow to stub out resources with a single module
|
// A map from regular expressions to module names or to arrays of module names that allow to stub out resources with a single module
|
||||||
// moduleNameMapper: {},
|
moduleNameMapper: {
|
||||||
|
'^_api(.*)$': '<rootDir>/src/core/api$1',
|
||||||
|
'^_blocks(.*)$': '<rootDir>/src/core/blocks$1',
|
||||||
|
'^_consts(.*)$': '<rootDir>/src/core/consts$1',
|
||||||
|
'^_hooks(.*)$': '<rootDir>/src/core/hooks$1',
|
||||||
|
'^_hoks(.*)$': '<rootDir>/src/core/hoks$1',
|
||||||
|
'^_services(.*)$': '<rootDir>/src/core/services$1',
|
||||||
|
'^_types(.*)$': '<rootDir>/src/core/types$1',
|
||||||
|
'^_utils(.*)$': '<rootDir>/src/core/utils$1',
|
||||||
|
'^_enums(.*)$': '<rootDir>/src/core/enums$1',
|
||||||
|
'^_pages(.*)$': '<rootDir>/src/pages$1',
|
||||||
|
'^_referers(.*)$': '<rootDir>/src/referers$1',
|
||||||
|
},
|
||||||
|
|
||||||
// An array of regexp pattern strings, matched against all module paths before considered 'visible' to the module loader
|
// An array of regexp pattern strings, matched against all module paths before considered 'visible' to the module loader
|
||||||
// modulePathIgnorePatterns: [],
|
// modulePathIgnorePatterns: [],
|
||||||
|
|
||||||
// Activates notifications for test results
|
// Activates notifications for test results
|
||||||
// notify: false,
|
// notify: false,
|
||||||
|
|
||||||
// An enum that specifies notification mode. Requires { notify: true }
|
// An enum that specifies notification mode. Requires { notify: true }
|
||||||
// notifyMode: "failure-change",
|
// notifyMode: "failure-change",
|
||||||
|
|
||||||
// A preset that is used as a base for Jest's configuration
|
// A preset that is used as a base for Jest's configuration
|
||||||
// preset: undefined,
|
// preset: undefined,
|
||||||
|
|
||||||
// Run tests from one or more projects
|
// Run tests from one or more projects
|
||||||
// projects: undefined,
|
// projects: undefined,
|
||||||
|
|
||||||
// Use this configuration option to add custom reporters to Jest
|
// Use this configuration option to add custom reporters to Jest
|
||||||
// reporters: undefined,
|
// reporters: undefined,
|
||||||
|
|
||||||
// Automatically reset mock state between every test
|
// Automatically reset mock state between every test
|
||||||
// resetMocks: false,
|
// resetMocks: false,
|
||||||
|
|
||||||
// Reset the module registry before running each individual test
|
// Reset the module registry before running each individual test
|
||||||
// resetModules: false,
|
// resetModules: false,
|
||||||
|
|
||||||
// A path to a custom resolver
|
// A path to a custom resolver
|
||||||
// resolver: undefined,
|
// resolver: undefined,
|
||||||
|
|
||||||
// Automatically restore mock state between every test
|
// Automatically restore mock state between every test
|
||||||
// restoreMocks: false,
|
// restoreMocks: false,
|
||||||
|
|
||||||
// The root directory that Jest should scan for tests and modules within
|
// The root directory that Jest should scan for tests and modules within
|
||||||
// rootDir: undefined,
|
// rootDir: undefined,
|
||||||
|
|
||||||
// A list of paths to directories that Jest should use to search for files in
|
// A list of paths to directories that Jest should use to search for files in
|
||||||
// roots: [
|
// roots: [
|
||||||
// "<rootDir>"
|
// "<rootDir>"
|
||||||
// ],
|
// ],
|
||||||
|
|
||||||
// Allows you to use a custom runner instead of Jest's default test runner
|
// Allows you to use a custom runner instead of Jest's default test runner
|
||||||
// runner: "jest-runner",
|
// runner: "jest-runner",
|
||||||
|
|
||||||
// The paths to modules that run some code to configure or set up the testing environment before each test
|
// The paths to modules that run some code to configure or set up the testing environment before each test
|
||||||
// setupFiles: [],
|
// setupFiles: [],
|
||||||
|
|
||||||
// A list of paths to modules that run some code to configure or set up the testing framework before each test
|
// A list of paths to modules that run some code to configure or set up the testing framework before each test
|
||||||
// setupFilesAfterEnv: [],
|
// setupFilesAfterEnv: [],
|
||||||
|
|
||||||
// A list of paths to snapshot serializer modules Jest should use for snapshot testing
|
// A list of paths to snapshot serializer modules Jest should use for snapshot testing
|
||||||
// snapshotSerializers: [],
|
// snapshotSerializers: [],
|
||||||
|
|
||||||
// The test environment that will be used for testing
|
// The test environment that will be used for testing
|
||||||
// testEnvironment: "jest-environment-jsdom",
|
// testEnvironment: "jest-environment-jsdom",
|
||||||
|
|
||||||
// Options that will be passed to the testEnvironment
|
// Options that will be passed to the testEnvironment
|
||||||
// testEnvironmentOptions: {},
|
// testEnvironmentOptions: {},
|
||||||
|
|
||||||
// Adds a location field to test results
|
// Adds a location field to test results
|
||||||
// testLocationInResults: false,
|
// testLocationInResults: false,
|
||||||
|
|
||||||
// The glob patterns Jest uses to detect test files
|
// The glob patterns Jest uses to detect test files
|
||||||
// testMatch: [
|
testMatch: ['**/__tests__/**/*.(j|t)s?(x)', '**/?(*.)+(spec|test).(j|t)s?(x)'],
|
||||||
// "**/__tests__/**/*.[jt]s?(x)",
|
|
||||||
// "**/?(*.)+(spec|test).[tj]s?(x)"
|
|
||||||
// ],
|
|
||||||
|
|
||||||
// An array of regexp pattern strings that are matched against all test paths, matched tests are skipped
|
// An array of regexp pattern strings that are matched against all test paths, matched tests are skipped
|
||||||
// testPathIgnorePatterns: [
|
testPathIgnorePatterns: [
|
||||||
// "/node_modules/"
|
'(.*)/dist'
|
||||||
// ],
|
],
|
||||||
|
|
||||||
// The regexp pattern or array of patterns that Jest uses to detect test files
|
// The regexp pattern or array of patterns that Jest uses to detect test files
|
||||||
// testRegex: [],
|
// testRegex: [],
|
||||||
|
|
||||||
// This option allows the use of a custom results processor
|
// This option allows the use of a custom results processor
|
||||||
// testResultsProcessor: undefined,
|
// testResultsProcessor: undefined,
|
||||||
|
|
||||||
// This option allows use of a custom test runner
|
// This option allows use of a custom test runner
|
||||||
// testRunner: "jasmine2",
|
// testRunner: "jasmine2",
|
||||||
|
|
||||||
// This option sets the URL for the jsdom environment. It is reflected in properties such as location.href
|
// This option sets the URL for the jsdom environment. It is reflected in properties such as location.href
|
||||||
// testURL: "http://localhost",
|
// testURL: "http://localhost",
|
||||||
|
|
||||||
// Setting this value to "fake" allows the use of fake timers for functions such as "setTimeout"
|
// Setting this value to "fake" allows the use of fake timers for functions such as "setTimeout"
|
||||||
// timers: "real",
|
// timers: "real",
|
||||||
|
|
||||||
// A map from regular expressions to paths to transformers
|
// A map from regular expressions to paths to transformers
|
||||||
// transform: undefined,
|
// transform: undefined,
|
||||||
|
|
||||||
// An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation
|
// An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation
|
||||||
// transformIgnorePatterns: [
|
// transformIgnorePatterns: [
|
||||||
// "/node_modules/"
|
// "/node_modules/"
|
||||||
// ],
|
// ],
|
||||||
|
|
||||||
// An array of regexp pattern strings that are matched against all modules before the module loader will automatically return a mock for them
|
// An array of regexp pattern strings that are matched against all modules before the module loader will automatically return a mock for them
|
||||||
// unmockedModulePathPatterns: undefined,
|
// unmockedModulePathPatterns: undefined,
|
||||||
|
|
||||||
// Indicates whether each individual test should be reported during the run
|
// Indicates whether each individual test should be reported during the run
|
||||||
// verbose: undefined,
|
// verbose: undefined,
|
||||||
|
|
||||||
// An array of regexp patterns that are matched against all source file paths before re-running tests in watch mode
|
// An array of regexp patterns that are matched against all source file paths before re-running tests in watch mode
|
||||||
// watchPathIgnorePatterns: [],
|
// watchPathIgnorePatterns: [],
|
||||||
|
|
||||||
// Whether to use watchman for file crawling
|
// Whether to use watchman for file crawling
|
||||||
// watchman: true,
|
// watchman: true,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -1,10 +1,10 @@
|
|||||||
export const enum TaskStatus {
|
export enum TaskStatus {
|
||||||
Progress = 'progress',
|
Progress = 'progress',
|
||||||
Removed = 'removed',
|
Removed = 'removed',
|
||||||
Done = 'done',
|
Done = 'done',
|
||||||
}
|
}
|
||||||
|
|
||||||
export const enum FolderType {
|
export enum FolderType {
|
||||||
Project = 'project',
|
Project = 'project',
|
||||||
Information = 'information',
|
Information = 'information',
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user