mirror of
https://github.com/hanzoai/jest.git
synced 2026-09-24 16:59:57 +00:00
29 lines
902 B
TypeScript
29 lines
902 B
TypeScript
/**
|
|
* 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 * as path from 'path';
|
|
import {skipSuiteOnJestCircus} from '@jest/test-utils';
|
|
import {extractSortedSummary, replaceJestBuildLineNumbers} from '../Utils';
|
|
import runJest from '../runJest';
|
|
|
|
skipSuiteOnJestCircus();
|
|
|
|
const dir = path.resolve(__dirname, '../test-failing');
|
|
|
|
test('throws an error about unsupported modifier', () => {
|
|
const result = runJest(dir);
|
|
expect(result.exitCode).toBe(1);
|
|
const {rest} = extractSortedSummary(result.stderr);
|
|
const normalized = replaceJestBuildLineNumbers(
|
|
rest.replaceAll(
|
|
'at Function.failing (../../packages/jest-jasmine2/',
|
|
'at concurrentFn.failing (../../packages/jest-jasmine2/',
|
|
),
|
|
);
|
|
expect(normalized).toMatchSnapshot();
|
|
});
|