Skip to content

Commit

Permalink
fix: use correct typings for config:init command
Browse files Browse the repository at this point in the history
  • Loading branch information
connorjburton authored and anh.pham committed Sep 22, 2022
1 parent 54b0682 commit f79aa11
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/cli/cli.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ Jest configuration written to "${normalize('/foo/bar/jest.config.js')}".
expect(fs.writeFileSync.mock.calls).toEqual([
[
normalize('/foo/bar/jest.config.js'),
`/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */
`/** @type {import('ts-jest').JestConfigWithTsJest} */
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
Expand All @@ -159,7 +159,7 @@ Jest configuration written to "${normalize('/foo/bar/jest.config.foo.js')}".
normalize('/foo/bar/jest.config.foo.js'),
`const { jsWithTs: tsjPreset } = require('ts-jest/presets');
/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */
/** @type {import('ts-jest').JestConfigWithTsJest} */
module.exports = {
...tsjPreset,
globals: {
Expand Down
2 changes: 1 addition & 1 deletion src/cli/config/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export const run: CliCommand = async (args: CliCommandArgs /* , logger: Logger *
if (!jestPreset) {
content.push(`${preset.jsImport('tsjPreset')};`, '')
}
content.push(`/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */`)
content.push(`/** @type {import('ts-jest').JestConfigWithTsJest} */`)
content.push('module.exports = {')
if (jestPreset) {
content.push(` preset: '${preset.name}',`)
Expand Down

0 comments on commit f79aa11

Please sign in to comment.