Skip to content
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

Add missing coverage and remove unnecessary checks #882

Merged
merged 4 commits into from Nov 7, 2018
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

Prev

Fixup lint test

  • Loading branch information
geek committed Nov 7, 2018
commit d9a469c764fec920c9296707f49d2a285256c5b0
@@ -36,7 +36,6 @@ exports.lint = function (settings) {
child.kill();

const result = { lint: message, totalErrors: 0, totalWarnings: 0 };

result.lint.forEach((lint) => {

let errors = 0;
@@ -8,7 +8,6 @@
const internals = {};


exports.method = function (value) {

return value;
exports.method = function (value){
return value
};
@@ -143,6 +143,7 @@ describe('Linters - eslint', () => {

it('should fix lint rules when --lint-fix used', async (flags) => {

let isFixed = false;
const originalWriteFileSync = Fs.writeFileSync;

flags.onCleanup = () => {
@@ -153,7 +154,8 @@ describe('Linters - eslint', () => {
Fs.writeFileSync = (path, output) => {

expect(path).to.endWith(Path.join('test', 'lint', 'eslint', 'fix', 'success.js'));
expect(output).to.endWith('\n\n return value;\n};\n');
expect(output).to.endWith('\n return value;\n};\n');
isFixed = true;
};

const path = Path.join(__dirname, 'lint', 'eslint', 'fix');
@@ -165,8 +167,9 @@ describe('Linters - eslint', () => {
expect(eslintResults).to.have.length(1);
expect(eslintResults[0]).to.include({
totalErrors: 0,
totalWarnings: 0
totalWarnings: 1
});
expect(isFixed, 'Lint updates not written').to.be.true();
});

it('should error on malformed lint-options', async () => {
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.