Skip to content

Commit

Permalink
fix: revert "Fixed slow builds" (#16)
Browse files Browse the repository at this point in the history
This reverts commit 0e2a38e.
  • Loading branch information
azz committed May 4, 2019
1 parent 0e2a38e commit c5e9fcc
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions src/runTsc.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,17 @@ const runTsc = ({ testPath, config: jestConfig }) => {
process.cwd()
);

const options = {
compilerOptions: {
noEmit: true,
...settings.options,
},
};
const options = Object.assign({}, { noEmit: true }, settings.options);

const program = ts.createProgram([testPath], options);

const emitResult = program.emit();

const transpileOutput = ts.transpileModule(testPath, options);
const allDiagnostics = ts
.getPreEmitDiagnostics(program)
.concat(emitResult.diagnostics);

const errors = transpileOutput.diagnostics
const errors = allDiagnostics
.map(diagnostic => {
if (diagnostic.file) {
const {
Expand Down

0 comments on commit c5e9fcc

Please sign in to comment.