Skip to content

Commit e0020d6

Browse files
committed
fix(tests): linter tests - useTypescriptIncrementalApi usage
actually use the correct `useTypescriptIncrementalApi` value for some of the linter tests that were using the default value before
1 parent 5ad2568 commit e0020d6

1 file changed

Lines changed: 13 additions & 6 deletions

File tree

‎test/integration/index.spec.js‎

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,15 @@ function makeCommonTests(useTypescriptIncrementalApi) {
2323
this.timeout(60000);
2424
var plugin;
2525

26+
const overrideOptions = { useTypescriptIncrementalApi };
27+
2628
function createCompiler(
2729
options,
2830
happyPackMode,
2931
entryPoint = './src/index.ts'
3032
) {
3133
options = options || {};
32-
options.useTypescriptIncrementalApi = useTypescriptIncrementalApi;
34+
options = { ...options, ...overrideOptions };
3335
var compiler = helpers.createCompiler(options, happyPackMode, entryPoint);
3436
plugin = compiler.plugin;
3537
return compiler.webpack;
@@ -87,7 +89,8 @@ function makeCommonTests(useTypescriptIncrementalApi) {
8789
fileName,
8890
{
8991
tslint: true,
90-
ignoreLintWarnings: true
92+
ignoreLintWarnings: true,
93+
...overrideOptions
9194
},
9295
(err, stats) => {
9396
expect(stats.compilation.warnings.length).to.be.eq(0);
@@ -102,7 +105,8 @@ function makeCommonTests(useTypescriptIncrementalApi) {
102105
fileName,
103106
{
104107
tslint: true,
105-
ignoreLintWarnings: true
108+
ignoreLintWarnings: true,
109+
...overrideOptions
106110
},
107111
(err, stats) => {
108112
expect(stats.compilation.errors.length).to.be.eq(0);
@@ -157,7 +161,8 @@ function makeCommonTests(useTypescriptIncrementalApi) {
157161
{
158162
tslintAutoFix: true,
159163
tslint: path.resolve(__dirname, './project/tslint.autofix.json'),
160-
tsconfig: false
164+
tsconfig: false,
165+
...overrideOptions
161166
},
162167
(err, stats, formattedFileContents) => {
163168
expect(stats.compilation.warnings.length).to.be.eq(0);
@@ -179,7 +184,8 @@ function makeCommonTests(useTypescriptIncrementalApi) {
179184
callback,
180185
fileName,
181186
{
182-
tslint: true
187+
tslint: true,
188+
...overrideOptions
183189
},
184190
(err, stats) => {
185191
expect(stats.compilation.warnings.length).to.be.eq(7);
@@ -362,7 +368,8 @@ function makeCommonTests(useTypescriptIncrementalApi) {
362368
helpers.testLintHierarchicalConfigs(
363369
callback,
364370
{
365-
tslint: true
371+
tslint: true,
372+
...overrideOptions
366373
},
367374
(err, stats) => {
368375
/*

0 commit comments

Comments
 (0)