-
Notifications
You must be signed in to change notification settings - Fork 12k
fix(tests): add test to verify noImplicityAny builds work #213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,7 +63,7 @@ describe('Basic end-to-end Workflow', function () { | |
'build', | ||
'--silent' | ||
]).then(function() { | ||
expect(fs.existsSync(path.join(process.cwd(), 'dist'))); | ||
expect(fs.existsSync(path.join(process.cwd(), 'dist'))).to.be.equal(true); | ||
}); | ||
}); | ||
|
||
|
@@ -174,8 +174,37 @@ describe('Basic end-to-end Workflow', function () { | |
expect(result.exitCode).to.be.equal(0); | ||
|
||
// Clean `tmp` folder | ||
process.chdir(path.resolve(root, '..')); | ||
sh.rm('-rf', './tmp'); // tmp.teardown takes too long | ||
// process.chdir(path.resolve(root, '..')); | ||
// sh.rm('-rf', './tmp'); // tmp.teardown takes too long | ||
}); | ||
}); | ||
|
||
it('Turn on `noImplicitAny` in tsconfig.json and rebuild', function (done) { | ||
this.timeout(420000); | ||
|
||
var configFilePath = path.join(process.cwd(), 'src', 'tsconfig.json'); | ||
fs.readFile(configFilePath, 'utf8', function(err, data){ | ||
|
||
var config = JSON.parse(data); | ||
config.compilerOptions.noImplicitAny = true; | ||
|
||
fs.writeFile(configFilePath, JSON.stringify(config), function(){ | ||
//clear the dist folder | ||
sh.rm('-rf', path.join(process.cwd(), 'dist')); | ||
|
||
return ng([ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, not needed. It was a result of copying in the promise implementation from above. But at the same time, right now that does not hurt anything. The next change I make in there, I'll clean that up, but I don't think it's worth a separate PR to remove it with no other changes. |
||
'build', | ||
'--silent' | ||
]).then(function() { | ||
expect(fs.existsSync(path.join(process.cwd(), 'dist'))).to.be.equal(true); | ||
}) | ||
.finally(function(){ | ||
// Clean `tmp` folder | ||
process.chdir(path.resolve(root, '..')); | ||
sh.rm('-rf', './tmp'); // tmp.teardown takes too long | ||
done(); | ||
}); | ||
}); | ||
}); | ||
}); | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be
args?: any[]
?