mirror of
https://github.com/xfarrow/blink
synced 2025-06-27 09:03:02 +02:00
Change endpoint from persons to people
This commit is contained in:
21
backend/apis/nodejs/node_modules/@jest/test-result/LICENSE
generated
vendored
Normal file
21
backend/apis/nodejs/node_modules/@jest/test-result/LICENSE
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
|
||||
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.
|
69
backend/apis/nodejs/node_modules/@jest/test-result/build/formatTestResults.js
generated
vendored
Normal file
69
backend/apis/nodejs/node_modules/@jest/test-result/build/formatTestResults.js
generated
vendored
Normal file
@ -0,0 +1,69 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
});
|
||||
exports.default = formatTestResults;
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
|
||||
const formatTestResult = (testResult, codeCoverageFormatter, reporter) => {
|
||||
if (testResult.testExecError) {
|
||||
const now = Date.now();
|
||||
return {
|
||||
assertionResults: testResult.testResults,
|
||||
coverage: {},
|
||||
endTime: now,
|
||||
message: testResult.failureMessage ?? testResult.testExecError.message,
|
||||
name: testResult.testFilePath,
|
||||
startTime: now,
|
||||
status: 'failed',
|
||||
summary: ''
|
||||
};
|
||||
}
|
||||
if (testResult.skipped) {
|
||||
const now = Date.now();
|
||||
return {
|
||||
assertionResults: testResult.testResults,
|
||||
coverage: {},
|
||||
endTime: now,
|
||||
message: testResult.failureMessage ?? '',
|
||||
name: testResult.testFilePath,
|
||||
startTime: now,
|
||||
status: 'skipped',
|
||||
summary: ''
|
||||
};
|
||||
}
|
||||
const allTestsExecuted = testResult.numPendingTests === 0;
|
||||
const allTestsPassed = testResult.numFailingTests === 0;
|
||||
return {
|
||||
assertionResults: testResult.testResults,
|
||||
coverage:
|
||||
codeCoverageFormatter != null
|
||||
? codeCoverageFormatter(testResult.coverage, reporter)
|
||||
: testResult.coverage,
|
||||
endTime: testResult.perfStats.end,
|
||||
message: testResult.failureMessage ?? '',
|
||||
name: testResult.testFilePath,
|
||||
startTime: testResult.perfStats.start,
|
||||
status: allTestsPassed
|
||||
? allTestsExecuted
|
||||
? 'passed'
|
||||
: 'focused'
|
||||
: 'failed',
|
||||
summary: ''
|
||||
};
|
||||
};
|
||||
function formatTestResults(results, codeCoverageFormatter, reporter) {
|
||||
const testResults = results.testResults.map(testResult =>
|
||||
formatTestResult(testResult, codeCoverageFormatter, reporter)
|
||||
);
|
||||
return {
|
||||
...results,
|
||||
testResults
|
||||
};
|
||||
}
|
175
backend/apis/nodejs/node_modules/@jest/test-result/build/helpers.js
generated
vendored
Normal file
175
backend/apis/nodejs/node_modules/@jest/test-result/build/helpers.js
generated
vendored
Normal file
@ -0,0 +1,175 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
});
|
||||
exports.makeEmptyAggregatedTestResult =
|
||||
exports.createEmptyTestResult =
|
||||
exports.buildFailureTestResult =
|
||||
exports.addResult =
|
||||
void 0;
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
|
||||
const makeEmptyAggregatedTestResult = () => ({
|
||||
numFailedTestSuites: 0,
|
||||
numFailedTests: 0,
|
||||
numPassedTestSuites: 0,
|
||||
numPassedTests: 0,
|
||||
numPendingTestSuites: 0,
|
||||
numPendingTests: 0,
|
||||
numRuntimeErrorTestSuites: 0,
|
||||
numTodoTests: 0,
|
||||
numTotalTestSuites: 0,
|
||||
numTotalTests: 0,
|
||||
openHandles: [],
|
||||
snapshot: {
|
||||
added: 0,
|
||||
didUpdate: false,
|
||||
// is set only after the full run
|
||||
failure: false,
|
||||
filesAdded: 0,
|
||||
// combines individual test results + removed files after the full run
|
||||
filesRemoved: 0,
|
||||
filesRemovedList: [],
|
||||
filesUnmatched: 0,
|
||||
filesUpdated: 0,
|
||||
matched: 0,
|
||||
total: 0,
|
||||
unchecked: 0,
|
||||
uncheckedKeysByFile: [],
|
||||
unmatched: 0,
|
||||
updated: 0
|
||||
},
|
||||
startTime: 0,
|
||||
success: true,
|
||||
testResults: [],
|
||||
wasInterrupted: false
|
||||
});
|
||||
exports.makeEmptyAggregatedTestResult = makeEmptyAggregatedTestResult;
|
||||
const buildFailureTestResult = (testPath, err) => ({
|
||||
console: undefined,
|
||||
displayName: undefined,
|
||||
failureMessage: null,
|
||||
leaks: false,
|
||||
numFailingTests: 0,
|
||||
numPassingTests: 0,
|
||||
numPendingTests: 0,
|
||||
numTodoTests: 0,
|
||||
openHandles: [],
|
||||
perfStats: {
|
||||
end: 0,
|
||||
runtime: 0,
|
||||
slow: false,
|
||||
start: 0
|
||||
},
|
||||
skipped: false,
|
||||
snapshot: {
|
||||
added: 0,
|
||||
fileDeleted: false,
|
||||
matched: 0,
|
||||
unchecked: 0,
|
||||
uncheckedKeys: [],
|
||||
unmatched: 0,
|
||||
updated: 0
|
||||
},
|
||||
testExecError: err,
|
||||
testFilePath: testPath,
|
||||
testResults: []
|
||||
});
|
||||
|
||||
// Add individual test result to an aggregated test result
|
||||
exports.buildFailureTestResult = buildFailureTestResult;
|
||||
const addResult = (aggregatedResults, testResult) => {
|
||||
// `todos` are new as of Jest 24, and not all runners return it.
|
||||
// Set it to `0` to avoid `NaN`
|
||||
if (!testResult.numTodoTests) {
|
||||
testResult.numTodoTests = 0;
|
||||
}
|
||||
aggregatedResults.testResults.push(testResult);
|
||||
aggregatedResults.numTotalTests +=
|
||||
testResult.numPassingTests +
|
||||
testResult.numFailingTests +
|
||||
testResult.numPendingTests +
|
||||
testResult.numTodoTests;
|
||||
aggregatedResults.numFailedTests += testResult.numFailingTests;
|
||||
aggregatedResults.numPassedTests += testResult.numPassingTests;
|
||||
aggregatedResults.numPendingTests += testResult.numPendingTests;
|
||||
aggregatedResults.numTodoTests += testResult.numTodoTests;
|
||||
if (testResult.testExecError) {
|
||||
aggregatedResults.numRuntimeErrorTestSuites++;
|
||||
}
|
||||
if (testResult.skipped) {
|
||||
aggregatedResults.numPendingTestSuites++;
|
||||
} else if (testResult.numFailingTests > 0 || testResult.testExecError) {
|
||||
aggregatedResults.numFailedTestSuites++;
|
||||
} else {
|
||||
aggregatedResults.numPassedTestSuites++;
|
||||
}
|
||||
|
||||
// Snapshot data
|
||||
if (testResult.snapshot.added) {
|
||||
aggregatedResults.snapshot.filesAdded++;
|
||||
}
|
||||
if (testResult.snapshot.fileDeleted) {
|
||||
aggregatedResults.snapshot.filesRemoved++;
|
||||
}
|
||||
if (testResult.snapshot.unmatched) {
|
||||
aggregatedResults.snapshot.filesUnmatched++;
|
||||
}
|
||||
if (testResult.snapshot.updated) {
|
||||
aggregatedResults.snapshot.filesUpdated++;
|
||||
}
|
||||
aggregatedResults.snapshot.added += testResult.snapshot.added;
|
||||
aggregatedResults.snapshot.matched += testResult.snapshot.matched;
|
||||
aggregatedResults.snapshot.unchecked += testResult.snapshot.unchecked;
|
||||
if (
|
||||
testResult.snapshot.uncheckedKeys != null &&
|
||||
testResult.snapshot.uncheckedKeys.length > 0
|
||||
) {
|
||||
aggregatedResults.snapshot.uncheckedKeysByFile.push({
|
||||
filePath: testResult.testFilePath,
|
||||
keys: testResult.snapshot.uncheckedKeys
|
||||
});
|
||||
}
|
||||
aggregatedResults.snapshot.unmatched += testResult.snapshot.unmatched;
|
||||
aggregatedResults.snapshot.updated += testResult.snapshot.updated;
|
||||
aggregatedResults.snapshot.total +=
|
||||
testResult.snapshot.added +
|
||||
testResult.snapshot.matched +
|
||||
testResult.snapshot.unmatched +
|
||||
testResult.snapshot.updated;
|
||||
};
|
||||
exports.addResult = addResult;
|
||||
const createEmptyTestResult = () => ({
|
||||
leaks: false,
|
||||
// That's legacy code, just adding it as needed for typing
|
||||
numFailingTests: 0,
|
||||
numPassingTests: 0,
|
||||
numPendingTests: 0,
|
||||
numTodoTests: 0,
|
||||
openHandles: [],
|
||||
perfStats: {
|
||||
end: 0,
|
||||
runtime: 0,
|
||||
slow: false,
|
||||
start: 0
|
||||
},
|
||||
skipped: false,
|
||||
snapshot: {
|
||||
added: 0,
|
||||
fileDeleted: false,
|
||||
matched: 0,
|
||||
unchecked: 0,
|
||||
uncheckedKeys: [],
|
||||
unmatched: 0,
|
||||
updated: 0
|
||||
},
|
||||
testFilePath: '',
|
||||
testResults: []
|
||||
});
|
||||
exports.createEmptyTestResult = createEmptyTestResult;
|
232
backend/apis/nodejs/node_modules/@jest/test-result/build/index.d.ts
generated
vendored
Normal file
232
backend/apis/nodejs/node_modules/@jest/test-result/build/index.d.ts
generated
vendored
Normal file
@ -0,0 +1,232 @@
|
||||
/**
|
||||
* 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 type {Circus} from '@jest/types';
|
||||
import type {Config} from '@jest/types';
|
||||
import type {ConsoleBuffer} from '@jest/console';
|
||||
import type {CoverageMap} from 'istanbul-lib-coverage';
|
||||
import type {CoverageMapData} from 'istanbul-lib-coverage';
|
||||
import type {IHasteFS} from 'jest-haste-map';
|
||||
import type {IModuleMap} from 'jest-haste-map';
|
||||
import type Resolver from 'jest-resolve';
|
||||
import type {TestResult as TestResult_2} from '@jest/types';
|
||||
import type {TransformTypes} from '@jest/types';
|
||||
import type {V8Coverage} from 'collect-v8-coverage';
|
||||
|
||||
export declare const addResult: (
|
||||
aggregatedResults: AggregatedResult,
|
||||
testResult: TestResult,
|
||||
) => void;
|
||||
|
||||
export declare type AggregatedResult = AggregatedResultWithoutCoverage & {
|
||||
coverageMap?: CoverageMap | null;
|
||||
};
|
||||
|
||||
declare type AggregatedResultWithoutCoverage = {
|
||||
numFailedTests: number;
|
||||
numFailedTestSuites: number;
|
||||
numPassedTests: number;
|
||||
numPassedTestSuites: number;
|
||||
numPendingTests: number;
|
||||
numTodoTests: number;
|
||||
numPendingTestSuites: number;
|
||||
numRuntimeErrorTestSuites: number;
|
||||
numTotalTests: number;
|
||||
numTotalTestSuites: number;
|
||||
openHandles: Array<Error>;
|
||||
snapshot: SnapshotSummary;
|
||||
startTime: number;
|
||||
success: boolean;
|
||||
testResults: Array<TestResult>;
|
||||
wasInterrupted: boolean;
|
||||
runExecError?: SerializableError;
|
||||
};
|
||||
|
||||
export declare type AssertionLocation = {
|
||||
fullName: string;
|
||||
path: string;
|
||||
};
|
||||
|
||||
export declare type AssertionResult = TestResult_2.AssertionResult;
|
||||
|
||||
export declare const buildFailureTestResult: (
|
||||
testPath: string,
|
||||
err: SerializableError,
|
||||
) => TestResult;
|
||||
|
||||
declare type CodeCoverageFormatter = (
|
||||
coverage: CoverageMapData | null | undefined,
|
||||
reporter: CodeCoverageReporter,
|
||||
) => Record<string, unknown> | null | undefined;
|
||||
|
||||
declare type CodeCoverageReporter = unknown;
|
||||
|
||||
export declare const createEmptyTestResult: () => TestResult;
|
||||
|
||||
export declare type FailedAssertion = {
|
||||
matcherName?: string;
|
||||
message?: string;
|
||||
actual?: unknown;
|
||||
pass?: boolean;
|
||||
passed?: boolean;
|
||||
expected?: unknown;
|
||||
isNot?: boolean;
|
||||
stack?: string;
|
||||
error?: unknown;
|
||||
};
|
||||
|
||||
declare type FormattedAssertionResult = Pick<
|
||||
AssertionResult,
|
||||
'ancestorTitles' | 'fullName' | 'location' | 'status' | 'title' | 'duration'
|
||||
> & {
|
||||
failureMessages: AssertionResult['failureMessages'] | null;
|
||||
};
|
||||
|
||||
declare type FormattedTestResult = {
|
||||
message: string;
|
||||
name: string;
|
||||
summary: string;
|
||||
status: 'failed' | 'passed' | 'skipped' | 'focused';
|
||||
startTime: number;
|
||||
endTime: number;
|
||||
coverage: unknown;
|
||||
assertionResults: Array<FormattedAssertionResult>;
|
||||
};
|
||||
|
||||
export declare type FormattedTestResults = {
|
||||
coverageMap?: CoverageMap | null | undefined;
|
||||
numFailedTests: number;
|
||||
numFailedTestSuites: number;
|
||||
numPassedTests: number;
|
||||
numPassedTestSuites: number;
|
||||
numPendingTests: number;
|
||||
numPendingTestSuites: number;
|
||||
numRuntimeErrorTestSuites: number;
|
||||
numTotalTests: number;
|
||||
numTotalTestSuites: number;
|
||||
snapshot: SnapshotSummary;
|
||||
startTime: number;
|
||||
success: boolean;
|
||||
testResults: Array<FormattedTestResult>;
|
||||
wasInterrupted: boolean;
|
||||
};
|
||||
|
||||
export declare function formatTestResults(
|
||||
results: AggregatedResult,
|
||||
codeCoverageFormatter?: CodeCoverageFormatter,
|
||||
reporter?: CodeCoverageReporter,
|
||||
): FormattedTestResults;
|
||||
|
||||
export declare const makeEmptyAggregatedTestResult: () => AggregatedResult;
|
||||
|
||||
export declare interface RuntimeTransformResult
|
||||
extends TransformTypes.TransformResult {
|
||||
wrapperLength: number;
|
||||
}
|
||||
|
||||
export declare type SerializableError = TestResult_2.SerializableError;
|
||||
|
||||
export declare type SnapshotSummary = {
|
||||
added: number;
|
||||
didUpdate: boolean;
|
||||
failure: boolean;
|
||||
filesAdded: number;
|
||||
filesRemoved: number;
|
||||
filesRemovedList: Array<string>;
|
||||
filesUnmatched: number;
|
||||
filesUpdated: number;
|
||||
matched: number;
|
||||
total: number;
|
||||
unchecked: number;
|
||||
uncheckedKeysByFile: Array<UncheckedSnapshot>;
|
||||
unmatched: number;
|
||||
updated: number;
|
||||
};
|
||||
|
||||
export declare type Status = AssertionResult['status'];
|
||||
|
||||
export declare type Suite = {
|
||||
title: string;
|
||||
suites: Array<Suite>;
|
||||
tests: Array<AssertionResult>;
|
||||
};
|
||||
|
||||
export declare type Test = {
|
||||
context: TestContext;
|
||||
duration?: number;
|
||||
path: string;
|
||||
};
|
||||
|
||||
export declare type TestCaseResult = AssertionResult;
|
||||
|
||||
export declare type TestContext = {
|
||||
config: Config.ProjectConfig;
|
||||
hasteFS: IHasteFS;
|
||||
moduleMap: IModuleMap;
|
||||
resolver: Resolver;
|
||||
};
|
||||
|
||||
export declare type TestEvents = {
|
||||
'test-file-start': [Test];
|
||||
'test-file-success': [Test, TestResult];
|
||||
'test-file-failure': [Test, SerializableError];
|
||||
'test-case-start': [string, Circus.TestCaseStartInfo];
|
||||
'test-case-result': [string, AssertionResult];
|
||||
};
|
||||
|
||||
export declare type TestFileEvent<
|
||||
T extends keyof TestEvents = keyof TestEvents,
|
||||
> = (eventName: T, args: TestEvents[T]) => unknown;
|
||||
|
||||
export declare type TestResult = {
|
||||
console?: ConsoleBuffer;
|
||||
coverage?: CoverageMapData;
|
||||
displayName?: Config.DisplayName;
|
||||
failureMessage?: string | null;
|
||||
leaks: boolean;
|
||||
memoryUsage?: number;
|
||||
numFailingTests: number;
|
||||
numPassingTests: number;
|
||||
numPendingTests: number;
|
||||
numTodoTests: number;
|
||||
openHandles: Array<Error>;
|
||||
perfStats: {
|
||||
end: number;
|
||||
runtime: number;
|
||||
slow: boolean;
|
||||
start: number;
|
||||
};
|
||||
skipped: boolean;
|
||||
snapshot: {
|
||||
added: number;
|
||||
fileDeleted: boolean;
|
||||
matched: number;
|
||||
unchecked: number;
|
||||
uncheckedKeys: Array<string>;
|
||||
unmatched: number;
|
||||
updated: number;
|
||||
};
|
||||
testExecError?: SerializableError;
|
||||
testFilePath: string;
|
||||
testResults: Array<AssertionResult>;
|
||||
v8Coverage?: V8CoverageResult;
|
||||
};
|
||||
|
||||
export declare type TestResultsProcessor = (
|
||||
results: AggregatedResult,
|
||||
) => AggregatedResult | Promise<AggregatedResult>;
|
||||
|
||||
declare type UncheckedSnapshot = {
|
||||
filePath: string;
|
||||
keys: Array<string>;
|
||||
};
|
||||
|
||||
export declare type V8CoverageResult = Array<{
|
||||
codeTransformResult: RuntimeTransformResult | undefined;
|
||||
result: V8Coverage[number];
|
||||
}>;
|
||||
|
||||
export {};
|
40
backend/apis/nodejs/node_modules/@jest/test-result/build/index.js
generated
vendored
Normal file
40
backend/apis/nodejs/node_modules/@jest/test-result/build/index.js
generated
vendored
Normal file
@ -0,0 +1,40 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, 'addResult', {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _helpers.addResult;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, 'buildFailureTestResult', {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _helpers.buildFailureTestResult;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, 'createEmptyTestResult', {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _helpers.createEmptyTestResult;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, 'formatTestResults', {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _formatTestResults.default;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, 'makeEmptyAggregatedTestResult', {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _helpers.makeEmptyAggregatedTestResult;
|
||||
}
|
||||
});
|
||||
var _formatTestResults = _interopRequireDefault(require('./formatTestResults'));
|
||||
var _helpers = require('./helpers');
|
||||
function _interopRequireDefault(obj) {
|
||||
return obj && obj.__esModule ? obj : {default: obj};
|
||||
}
|
1
backend/apis/nodejs/node_modules/@jest/test-result/build/types.js
generated
vendored
Normal file
1
backend/apis/nodejs/node_modules/@jest/test-result/build/types.js
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
'use strict';
|
36
backend/apis/nodejs/node_modules/@jest/test-result/package.json
generated
vendored
Normal file
36
backend/apis/nodejs/node_modules/@jest/test-result/package.json
generated
vendored
Normal file
@ -0,0 +1,36 @@
|
||||
{
|
||||
"name": "@jest/test-result",
|
||||
"version": "29.7.0",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/jestjs/jest.git",
|
||||
"directory": "packages/jest-test-result"
|
||||
},
|
||||
"license": "MIT",
|
||||
"main": "./build/index.js",
|
||||
"types": "./build/index.d.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./build/index.d.ts",
|
||||
"default": "./build/index.js"
|
||||
},
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"dependencies": {
|
||||
"@jest/console": "^29.7.0",
|
||||
"@jest/types": "^29.6.3",
|
||||
"@types/istanbul-lib-coverage": "^2.0.0",
|
||||
"collect-v8-coverage": "^1.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"jest-haste-map": "^29.7.0",
|
||||
"jest-resolve": "^29.7.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^14.15.0 || ^16.10.0 || >=18.0.0"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"gitHead": "4e56991693da7cd4c3730dc3579a1dd1403ee630"
|
||||
}
|
Reference in New Issue
Block a user