Add node modules and new code for release (#39)
Co-authored-by: tbarnes94 <tbarnes94@users.noreply.github.com>
This commit is contained in:
parent
a10d84bc2e
commit
7ad2aa66bb
7655 changed files with 1763577 additions and 14 deletions
8
node_modules/@jest/test-result/build/formatTestResults.d.ts
generated
vendored
Normal file
8
node_modules/@jest/test-result/build/formatTestResults.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,8 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
import type { AggregatedResult, CodeCoverageFormatter, CodeCoverageReporter, FormattedTestResults } from './types';
|
||||
export default function formatTestResults(results: AggregatedResult, codeCoverageFormatter?: CodeCoverageFormatter, reporter?: CodeCoverageReporter): FormattedTestResults;
|
70
node_modules/@jest/test-result/build/formatTestResults.js
generated
vendored
Normal file
70
node_modules/@jest/test-result/build/formatTestResults.js
generated
vendored
Normal file
|
@ -0,0 +1,70 @@
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
});
|
||||
exports.default = formatTestResults;
|
||||
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
|
||||
*
|
||||
* 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) => {
|
||||
const assertionResults = testResult.testResults.map(formatTestAssertion);
|
||||
|
||||
if (testResult.testExecError) {
|
||||
const now = Date.now();
|
||||
return {
|
||||
assertionResults,
|
||||
coverage: {},
|
||||
endTime: now,
|
||||
message: testResult.failureMessage
|
||||
? testResult.failureMessage
|
||||
: testResult.testExecError.message,
|
||||
name: testResult.testFilePath,
|
||||
startTime: now,
|
||||
status: 'failed',
|
||||
summary: ''
|
||||
};
|
||||
} else {
|
||||
const allTestsPassed = testResult.numFailingTests === 0;
|
||||
return {
|
||||
assertionResults,
|
||||
coverage: codeCoverageFormatter
|
||||
? codeCoverageFormatter(testResult.coverage, reporter)
|
||||
: testResult.coverage,
|
||||
endTime: testResult.perfStats.end,
|
||||
message: testResult.failureMessage || '',
|
||||
name: testResult.testFilePath,
|
||||
startTime: testResult.perfStats.start,
|
||||
status: allTestsPassed ? 'passed' : 'failed',
|
||||
summary: ''
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
function formatTestAssertion(assertion) {
|
||||
const result = {
|
||||
ancestorTitles: assertion.ancestorTitles,
|
||||
failureMessages: null,
|
||||
fullName: assertion.fullName,
|
||||
location: assertion.location,
|
||||
status: assertion.status,
|
||||
title: assertion.title
|
||||
};
|
||||
|
||||
if (assertion.failureMessages) {
|
||||
result.failureMessages = assertion.failureMessages;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
function formatTestResults(results, codeCoverageFormatter, reporter) {
|
||||
const testResults = results.testResults.map(testResult =>
|
||||
formatTestResult(testResult, codeCoverageFormatter, reporter)
|
||||
);
|
||||
return {...results, testResults};
|
||||
}
|
12
node_modules/@jest/test-result/build/helpers.d.ts
generated
vendored
Normal file
12
node_modules/@jest/test-result/build/helpers.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,12 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
import type { Config } from '@jest/types';
|
||||
import type { AggregatedResult, SerializableError, TestResult } from './types';
|
||||
export declare const makeEmptyAggregatedTestResult: () => AggregatedResult;
|
||||
export declare const buildFailureTestResult: (testPath: Config.Path, err: SerializableError) => TestResult;
|
||||
export declare const addResult: (aggregatedResults: AggregatedResult, testResult: TestResult) => void;
|
||||
export declare const createEmptyTestResult: () => TestResult;
|
185
node_modules/@jest/test-result/build/helpers.js
generated
vendored
Normal file
185
node_modules/@jest/test-result/build/helpers.js
generated
vendored
Normal file
|
@ -0,0 +1,185 @@
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
});
|
||||
exports.createEmptyTestResult = exports.addResult = exports.buildFailureTestResult = exports.makeEmptyAggregatedTestResult = void 0;
|
||||
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
|
||||
*
|
||||
* 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
|
||||
},
|
||||
sourceMaps: {},
|
||||
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 &&
|
||||
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;
|
9
node_modules/@jest/test-result/build/index.d.ts
generated
vendored
Normal file
9
node_modules/@jest/test-result/build/index.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,9 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
export { default as formatTestResults } from './formatTestResults';
|
||||
export { addResult, buildFailureTestResult, createEmptyTestResult, makeEmptyAggregatedTestResult, } from './helpers';
|
||||
export type { AggregatedResult, AssertionLocation, AssertionResult, FailedAssertion, FormattedTestResults, Milliseconds, SerializableError, SnapshotSummary, Status, Suite, TestResult, TestCaseResult, V8CoverageResult, } from './types';
|
43
node_modules/@jest/test-result/build/index.js
generated
vendored
Normal file
43
node_modules/@jest/test-result/build/index.js
generated
vendored
Normal file
|
@ -0,0 +1,43 @@
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, 'formatTestResults', {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _formatTestResults.default;
|
||||
}
|
||||
});
|
||||
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, '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};
|
||||
}
|
149
node_modules/@jest/test-result/build/types.d.ts
generated
vendored
Normal file
149
node_modules/@jest/test-result/build/types.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,149 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
import type { CoverageMap, CoverageMapData } from 'istanbul-lib-coverage';
|
||||
import type { ConsoleBuffer } from '@jest/console';
|
||||
import type { Config, TestResult, TransformTypes } from '@jest/types';
|
||||
import type { V8Coverage } from 'collect-v8-coverage';
|
||||
export declare type V8CoverageResult = Array<{
|
||||
codeTransformResult: TransformTypes.TransformResult | undefined;
|
||||
result: V8Coverage[number];
|
||||
}>;
|
||||
export declare type SerializableError = TestResult.SerializableError;
|
||||
export declare type FailedAssertion = {
|
||||
matcherName?: string;
|
||||
message?: string;
|
||||
actual?: any;
|
||||
pass?: boolean;
|
||||
passed?: boolean;
|
||||
expected?: any;
|
||||
isNot?: boolean;
|
||||
stack?: string;
|
||||
error?: any;
|
||||
};
|
||||
export declare type AssertionLocation = {
|
||||
fullName: string;
|
||||
path: string;
|
||||
};
|
||||
export declare type Status = AssertionResult['status'];
|
||||
export declare type Bytes = number;
|
||||
export declare type Milliseconds = TestResult.Milliseconds;
|
||||
export declare type AssertionResult = TestResult.AssertionResult;
|
||||
export declare type FormattedAssertionResult = Pick<AssertionResult, 'ancestorTitles' | 'fullName' | 'location' | 'status' | 'title'> & {
|
||||
failureMessages: AssertionResult['failureMessages'] | null;
|
||||
};
|
||||
export 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;
|
||||
};
|
||||
export declare type AggregatedResult = AggregatedResultWithoutCoverage & {
|
||||
coverageMap?: CoverageMap | null;
|
||||
};
|
||||
export declare type Suite = {
|
||||
title: string;
|
||||
suites: Array<Suite>;
|
||||
tests: Array<AssertionResult>;
|
||||
};
|
||||
export declare type TestCaseResult = AssertionResult;
|
||||
export declare type TestResult = {
|
||||
console?: ConsoleBuffer;
|
||||
coverage?: CoverageMapData;
|
||||
displayName?: Config.DisplayName;
|
||||
failureMessage?: string | null;
|
||||
leaks: boolean;
|
||||
memoryUsage?: Bytes;
|
||||
numFailingTests: number;
|
||||
numPassingTests: number;
|
||||
numPendingTests: number;
|
||||
numTodoTests: number;
|
||||
openHandles: Array<Error>;
|
||||
perfStats: {
|
||||
end: Milliseconds;
|
||||
runtime: Milliseconds;
|
||||
slow: boolean;
|
||||
start: Milliseconds;
|
||||
};
|
||||
skipped: boolean;
|
||||
snapshot: {
|
||||
added: number;
|
||||
fileDeleted: boolean;
|
||||
matched: number;
|
||||
unchecked: number;
|
||||
uncheckedKeys: Array<string>;
|
||||
unmatched: number;
|
||||
updated: number;
|
||||
};
|
||||
sourceMaps?: {
|
||||
[sourcePath: string]: string;
|
||||
};
|
||||
testExecError?: SerializableError;
|
||||
testFilePath: Config.Path;
|
||||
testResults: Array<AssertionResult>;
|
||||
v8Coverage?: V8CoverageResult;
|
||||
};
|
||||
export declare type FormattedTestResult = {
|
||||
message: string;
|
||||
name: string;
|
||||
summary: string;
|
||||
status: 'failed' | 'passed';
|
||||
startTime: number;
|
||||
endTime: number;
|
||||
coverage: any;
|
||||
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 type CodeCoverageReporter = any;
|
||||
export declare type CodeCoverageFormatter = (coverage: CoverageMapData | null | undefined, reporter: CodeCoverageReporter) => Record<string, any> | null | undefined;
|
||||
export declare type UncheckedSnapshot = {
|
||||
filePath: string;
|
||||
keys: Array<string>;
|
||||
};
|
||||
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;
|
||||
};
|
1
node_modules/@jest/test-result/build/types.js
generated
vendored
Normal file
1
node_modules/@jest/test-result/build/types.js
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
'use strict';
|
Loading…
Add table
Add a link
Reference in a new issue