message: chore: refactor verification of old TS version
diff: @@ -18,7 +18,7 @@ const jestDirectory = path.resolve(__dirname, '../packages/jest');
  /* eslint-disable sort-keys */
  const tsConfig = {
  - extends: '@tsconfig/node12/tsconfig.json',
  + extends: require('../tsconfig.json').extends,
  compilerOptions: {
  esModuleInterop: false,
  moduleResolution: 'node',
  @@ -27,17 +27,22 @@ const tsConfig = {
  };
  /* eslint-enable */
  -const cwd = tempy.directory();
  -
  const tsVersion = '4.2';
  +function smoketest() {
  + const cwd = tempy.directory();
  +
  try {
  - fs.writeFileSync(path.join(cwd, '.yarnrc.yml'), 'nodeLinker: node-modules\n');
  + fs.writeFileSync(
  + path.join(cwd, '.yarnrc.yml'),
  + 'nodeLinker: node-modules\n',
  + );
  execa.sync('yarn', ['init', '--yes'], {cwd, stdio: 'inherit'});
  - execa.sync('yarn', ['add', `typescript@~${tsVersion}`, '@tsconfig/node12'], {
  - cwd,
  - stdio: 'inherit',
  - });
  + execa.sync(
  + 'yarn',
  + ['add', `typescript@~${tsVersion}`, '@tsconfig/node12'],
  + {cwd, stdio: 'inherit'},
  + );
  fs.writeFileSync(
  path.join(cwd, 'tsconfig.json'),
  JSON.stringify(tsConfig, null, 2),
  @@ -56,3 +61,6 @@ try {
  } finally {
  rimraf.sync(cwd);
  }
  +}
  +
  +smoketest();
  