Skip to content

Commit

Permalink
fix(tests): linter tests - useTypescriptIncrementalApi usage
Browse files Browse the repository at this point in the history
actually use the correct `useTypescriptIncrementalApi` value for some of the linter tests that were using the default value before
  • Loading branch information
phryneas committed Apr 22, 2019
1 parent 5ad2568 commit e0020d6
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions test/integration/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,15 @@ function makeCommonTests(useTypescriptIncrementalApi) {
this.timeout(60000);
var plugin;

const overrideOptions = { useTypescriptIncrementalApi };

function createCompiler(
options,
happyPackMode,
entryPoint = './src/index.ts'
) {
options = options || {};
options.useTypescriptIncrementalApi = useTypescriptIncrementalApi;
options = { ...options, ...overrideOptions };
var compiler = helpers.createCompiler(options, happyPackMode, entryPoint);
plugin = compiler.plugin;
return compiler.webpack;
Expand Down Expand Up @@ -87,7 +89,8 @@ function makeCommonTests(useTypescriptIncrementalApi) {
fileName,
{
tslint: true,
ignoreLintWarnings: true
ignoreLintWarnings: true,
...overrideOptions
},
(err, stats) => {
expect(stats.compilation.warnings.length).to.be.eq(0);
Expand All @@ -102,7 +105,8 @@ function makeCommonTests(useTypescriptIncrementalApi) {
fileName,
{
tslint: true,
ignoreLintWarnings: true
ignoreLintWarnings: true,
...overrideOptions
},
(err, stats) => {
expect(stats.compilation.errors.length).to.be.eq(0);
Expand Down Expand Up @@ -157,7 +161,8 @@ function makeCommonTests(useTypescriptIncrementalApi) {
{
tslintAutoFix: true,
tslint: path.resolve(__dirname, './project/tslint.autofix.json'),
tsconfig: false
tsconfig: false,
...overrideOptions
},
(err, stats, formattedFileContents) => {
expect(stats.compilation.warnings.length).to.be.eq(0);
Expand All @@ -179,7 +184,8 @@ function makeCommonTests(useTypescriptIncrementalApi) {
callback,
fileName,
{
tslint: true
tslint: true,
...overrideOptions
},
(err, stats) => {
expect(stats.compilation.warnings.length).to.be.eq(7);
Expand Down Expand Up @@ -362,7 +368,8 @@ function makeCommonTests(useTypescriptIncrementalApi) {
helpers.testLintHierarchicalConfigs(
callback,
{
tslint: true
tslint: true,
...overrideOptions
},
(err, stats) => {
/*
Expand Down

0 comments on commit e0020d6

Please sign in to comment.