Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix(cli): fix config:init genarate invalid type comment (#2773)
Closes #2772
  • Loading branch information
bobstrange committed Jul 25, 2021
1 parent 0483e55 commit ede8a20
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
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/dist/types').InitialOptionsTsJest} */
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/dist/types').InitialOptionsTsJest} */
module.exports = {
...tsjPreset,
globals: {
Expand Down
2 changes: 1 addition & 1 deletion src/cli/config/init.ts
Expand Up @@ -90,7 +90,7 @@ export const run: CliCommand = async (args: Arguments /* , logger: Logger */) =>
if (!jestPreset) {
content.push(`${preset.jsImport('tsjPreset')};`, '')
}
content.push(`/** @type {import('@ts-jest/dist/types').InitialOptionsTsJest} */`)
content.push(`/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */`)
content.push('module.exports = {')
if (jestPreset) {
content.push(` preset: '${preset.name}',`)
Expand Down

0 comments on commit ede8a20

Please sign in to comment.