Add unit tests for role middleware
Some checks are pending
Docker Test / test (push) Waiting to run

This commit is contained in:
BibaBot 2026-03-17 07:07:36 +00:00
parent 7a9bf3199a
commit c294e2e9ae
5702 changed files with 465039 additions and 34 deletions

22
node_modules/@jest/core/LICENSE generated vendored Normal file
View file

@ -0,0 +1,22 @@
MIT License
Copyright (c) Meta Platforms, Inc. and affiliates.
Copyright Contributors to the Jest project.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

3
node_modules/@jest/core/README.md generated vendored Normal file
View file

@ -0,0 +1,3 @@
# @jest/core
Jest is currently working on providing a programmatic API. This is under development, and usage of this package directly is currently not supported.

114
node_modules/@jest/core/build/index.d.ts generated vendored Normal file
View file

@ -0,0 +1,114 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import {TestPathPatternsExecutor} from '@jest/pattern';
import {BaseReporter, Reporter, ReporterContext} from '@jest/reporters';
import {AggregatedResult, Test, TestContext} from '@jest/test-result';
import {Config} from '@jest/types';
import {ChangedFiles} from 'jest-changed-files';
import {TestRunnerContext} from 'jest-runner';
import {TestWatcher} from 'jest-watcher';
export declare function createTestScheduler(
globalConfig: Config.GlobalConfig,
context: TestSchedulerContext,
): Promise<TestScheduler>;
declare type Filter = (testPaths: Array<string>) => Promise<{
filtered: Array<string>;
}>;
export declare function getVersion(): string;
declare type ReporterConstructor = new (
globalConfig: Config.GlobalConfig,
reporterConfig: Record<string, unknown>,
reporterContext: ReporterContext,
) => BaseReporter;
export declare function runCLI(
argv: Config.Argv,
projects: Array<string>,
): Promise<{
results: AggregatedResult;
globalConfig: Config.GlobalConfig;
}>;
declare type SearchResult = {
noSCM?: boolean;
stats?: Stats;
collectCoverageFrom?: Set<string>;
tests: Array<Test>;
total?: number;
};
export declare class SearchSource {
private readonly _context;
private _dependencyResolver;
private readonly _testPathCases;
constructor(context: TestContext);
private _getOrBuildDependencyResolver;
private _filterTestPathsWithStats;
private _getAllTestPaths;
isTestFilePath(path: string): boolean;
findMatchingTests(
testPathPatternsExecutor: TestPathPatternsExecutor,
): SearchResult;
findRelatedTests(
allPaths: Set<string>,
collectCoverage: boolean,
): Promise<SearchResult>;
findTestsByPaths(paths: Array<string>): SearchResult;
findRelatedTestsFromPattern(
paths: Array<string>,
collectCoverage: boolean,
): Promise<SearchResult>;
findTestRelatedToChangedFiles(
changedFilesInfo: ChangedFiles,
collectCoverage: boolean,
): Promise<SearchResult>;
private _getTestPaths;
filterPathsWin32(paths: Array<string>): Array<string>;
getTestPaths(
globalConfig: Config.GlobalConfig,
projectConfig: Config.ProjectConfig,
changedFiles?: ChangedFiles,
filter?: Filter,
): Promise<SearchResult>;
findRelatedSourcesFromTestsInChangedFiles(
changedFilesInfo: ChangedFiles,
): Promise<Array<string>>;
}
declare type Stats = {
roots: number;
testMatch: number;
testPathIgnorePatterns: number;
testRegex: number;
testPathPatterns?: number;
};
declare class TestScheduler {
private readonly _context;
private readonly _dispatcher;
private readonly _globalConfig;
constructor(globalConfig: Config.GlobalConfig, context: TestSchedulerContext);
addReporter(reporter: Reporter): void;
removeReporter(reporterConstructor: ReporterConstructor): void;
scheduleTests(
tests: Array<Test>,
watcher: TestWatcher,
): Promise<AggregatedResult>;
private _partitionTests;
_setupReporters(): Promise<void>;
private _addCustomReporter;
private _bailIfNeeded;
}
declare type TestSchedulerContext = ReporterContext & TestRunnerContext;
export {};

4144
node_modules/@jest/core/build/index.js generated vendored Normal file

File diff suppressed because it is too large Load diff

6
node_modules/@jest/core/build/index.mjs generated vendored Normal file
View file

@ -0,0 +1,6 @@
import cjsModule from './index.js';
export const SearchSource = cjsModule.SearchSource;
export const createTestScheduler = cjsModule.createTestScheduler;
export const getVersion = cjsModule.getVersion;
export const runCLI = cjsModule.runCLI;

101
node_modules/@jest/core/package.json generated vendored Normal file
View file

@ -0,0 +1,101 @@
{
"name": "@jest/core",
"description": "Delightful JavaScript Testing.",
"version": "30.3.0",
"main": "./build/index.js",
"types": "./build/index.d.ts",
"exports": {
".": {
"types": "./build/index.d.ts",
"require": "./build/index.js",
"import": "./build/index.mjs",
"default": "./build/index.js"
},
"./package.json": "./package.json"
},
"dependencies": {
"@jest/console": "30.3.0",
"@jest/pattern": "30.0.1",
"@jest/reporters": "30.3.0",
"@jest/test-result": "30.3.0",
"@jest/transform": "30.3.0",
"@jest/types": "30.3.0",
"@types/node": "*",
"ansi-escapes": "^4.3.2",
"chalk": "^4.1.2",
"ci-info": "^4.2.0",
"exit-x": "^0.2.2",
"graceful-fs": "^4.2.11",
"jest-changed-files": "30.3.0",
"jest-config": "30.3.0",
"jest-haste-map": "30.3.0",
"jest-message-util": "30.3.0",
"jest-regex-util": "30.0.1",
"jest-resolve": "30.3.0",
"jest-resolve-dependencies": "30.3.0",
"jest-runner": "30.3.0",
"jest-runtime": "30.3.0",
"jest-snapshot": "30.3.0",
"jest-util": "30.3.0",
"jest-validate": "30.3.0",
"jest-watcher": "30.3.0",
"pretty-format": "30.3.0",
"slash": "^3.0.0"
},
"devDependencies": {
"@jest/test-sequencer": "30.3.0",
"@jest/test-utils": "30.3.0",
"@types/graceful-fs": "^4.1.9"
},
"peerDependencies": {
"node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0"
},
"peerDependenciesMeta": {
"node-notifier": {
"optional": true
}
},
"engines": {
"node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0"
},
"repository": {
"type": "git",
"url": "https://github.com/jestjs/jest.git",
"directory": "packages/jest-core"
},
"bugs": {
"url": "https://github.com/jestjs/jest/issues"
},
"homepage": "https://jestjs.io/",
"license": "MIT",
"keywords": [
"ava",
"babel",
"coverage",
"easy",
"expect",
"facebook",
"immersive",
"instant",
"jasmine",
"jest",
"jsdom",
"mocha",
"mocking",
"painless",
"qunit",
"runner",
"sandboxed",
"snapshot",
"tap",
"tape",
"test",
"testing",
"typescript",
"watch"
],
"publishConfig": {
"access": "public"
},
"gitHead": "efb59c2e81083f8dc941f20d6d20a3af2dc8d068"
}