Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use correct typings for config:init command #3825

Merged
merged 1 commit into from
Sep 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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