Skip to content

Commit

Permalink
refactor(devs-infra): mark a few typings as internal (#1860)
Browse files Browse the repository at this point in the history
  • Loading branch information
ahnpnl committed Aug 6, 2020
1 parent 03c1d05 commit 079ee8d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/config/config-set.spec.ts
Expand Up @@ -849,9 +849,11 @@ describe('readTsConfig', () => {
describe('versions', () => {
describe('package version cannot be resolved', () => {
let mock: jest.MockInstance<string | undefined, [string]>

beforeEach(() => {
mock = mocked(getPackageVersion).mockReturnValue(undefined)
})

afterEach(() => {
mock.mockRestore()
})
Expand Down
7 changes: 6 additions & 1 deletion src/index.ts
Expand Up @@ -31,8 +31,13 @@ export const mocked = helperMoved('mocked', mockedCore)
export const createJestPreset = helperMoved('createJestPreset', createJestPresetCore)
/** @deprecated */
export const pathsToModuleNameMapper = helperMoved('pathsToModuleNameMapper', pathsToModuleNameMapperCore)

/**
* @internal
*/
export const version: string = require('../package.json').version
/**
* @internal
*/
export const digest: string = readFileSync(resolve(__dirname, '..', '.ts-jest-digest'), 'utf8')

let transformer!: TsJestTransformer
Expand Down
4 changes: 3 additions & 1 deletion src/types.ts
Expand Up @@ -177,7 +177,9 @@ interface TsJestConfig$packageJson$inline {
}
type TsJestConfig$packageJson = TsJestConfig$packageJson$file | TsJestConfig$packageJson$inline | undefined
type TsJestConfig$stringifyContentPathRegex = string | undefined

/**
* @internal
*/
export interface TsJestConfig {
tsConfig: TsJestConfig$tsConfig
packageJson: TsJestConfig$packageJson
Expand Down

0 comments on commit 079ee8d

Please sign in to comment.