Skip to content

Commit

Permalink
Merge pull request #41 from editorconfig-checker/greenkeeper/xo-0.23.0
Browse files Browse the repository at this point in the history
Update xo to the latest version 🚀
  • Loading branch information
mstruebing authored Sep 3, 2018
2 parents 84f7241 + eb5cead commit e33866c
Show file tree
Hide file tree
Showing 6 changed files with 133 additions and 139 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,6 @@
"babel-preset-es2015": "^6.24.0",
"coveralls": "^3.0.0",
"jest": "^23.0.0",
"xo": "^0.22.0"
"xo": "^0.23.0"
}
}
10 changes: 5 additions & 5 deletions src/editorconfig/editorconfig.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import getEditorconfigForFile from './editorconfig';
const basePath = './Build/TestFiles/Editorconfig/';
const getEditorconfig = filePath => getEditorconfigForFile(`${basePath}${filePath}`);

test(`should get basic rules`, () => {
test('should get basic rules', () => {
const editorconfig = getEditorconfig('someFile.js');

const expected = {
Expand All @@ -14,7 +14,7 @@ test(`should get basic rules`, () => {
expect(editorconfig).toEqual(expected);
});

test(`should get basic rules`, () => {
test('should get basic rules', () => {
const editorconfig = getEditorconfig('someFile.php');

const expected = {
Expand All @@ -25,7 +25,7 @@ test(`should get basic rules`, () => {
expect(editorconfig).toEqual(expected);
});

test(`should compose rules`, () => {
test('should compose rules', () => {
const editorconfig = getEditorconfig('1/someFile.js');

const expected = {
Expand All @@ -37,7 +37,7 @@ test(`should compose rules`, () => {
expect(editorconfig).toEqual(expected);
});

test(`should get root rules`, () => {
test('should get root rules', () => {
const editorconfig = getEditorconfig('1/someFile.php');

const expected = {
Expand All @@ -48,7 +48,7 @@ test(`should get root rules`, () => {
expect(editorconfig).toEqual(expected);
});

test(`should get root rules`, () => {
test('should get root rules', () => {
const editorconfig = getEditorconfig('2/someFile.php');

const expected = {
Expand Down
8 changes: 4 additions & 4 deletions src/logger/logger.test.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
import {log, success, info, error} from './logger';

test(`log should call console.log();`, () => {
test('log should call console.log();', () => {
console.log = jest.fn();
log('some log;');
expect(console.log).toBeCalled();
});

test(`log should call console.log();`, () => {
test('log should call console.log();', () => {
console.log = jest.fn();
success('some log;');
expect(console.log).toBeCalled();
});

test(`info should call console.log();`, () => {
test('info should call console.log();', () => {
console.log = jest.fn();
info('some log;');
expect(console.log).toBeCalled();
});

test(`error should call console.error`, () => {
test('error should call console.error', () => {
console.error = jest.fn();
error('some log;');
expect(console.error).toBeCalled();
Expand Down
10 changes: 5 additions & 5 deletions src/utils/merge-deep.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,33 @@ import mergeDeep from './merge-deep';

/* eslint-disable camelcase */

test(`should merge two objects with different keys`, () => {
test('should merge two objects with different keys', () => {
const a = {'*.js': {indent_size: 2}};
const b = {'*': {indent_style: 'space'}};
const merged = mergeDeep({}, a, b);

expect(merged).toEqual({'*': {indent_style: 'space'}, '*.js': {indent_size: 2}});
});

test(`should deep merge two objects`, () => {
test('should deep merge two objects', () => {
const a = {'*.js': {indent_size: 2}};
const b = {'*.js': {indent_style: 'space'}};
const merged = mergeDeep({}, a, b);

expect(merged).toEqual({'*.js': {indent_size: 2, indent_style: 'space'}});
});

test(`should deep merge two objects`, () => {
test('should deep merge two objects', () => {
const merged = mergeDeep({a: 1}, {b: {c: {d: {e: 12345}}}});
expect(merged).toEqual({a: 1, b: {c: {d: {e: 12345}}}});
});

test(`should deep merge two objects`, () => {
test('should deep merge two objects', () => {
const merged = mergeDeep({a: 1}, {b: {c: {d: ['abc']}}});
expect(merged).toEqual({a: 1, b: {c: {d: ['abc']}}});
});

test(`should return original argument if its not an object`, () => {
test('should return original argument if its not an object', () => {
const merged = mergeDeep('abc', {b: {c: {d: ['abc']}}});
expect(merged).toEqual('abc');
});
Expand Down
20 changes: 10 additions & 10 deletions src/validation/validation-process.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,29 @@ console.error = jest.fn();

const filePath = `${process.cwd()}/src/index.js`;

test(`should return 0 for a valid file`, () => {
test('should return 0 for a valid file', () => {
const editorconfig = {};

expect(validateFile(filePath, editorconfig).length).toEqual(0);
});

test(`should return an integer greater 0 for an invalid file`, () => {
test('should return an integer greater 0 for an invalid file', () => {
const editorconfig = {
indent_style: 'space' // eslint-disable-line camelcase
};

expect(validateFile(filePath, editorconfig).length).toBeGreaterThan(0);
});

test(`should return an integer greater 0 for an invalid file`, () => {
test('should return an integer greater 0 for an invalid file', () => {
const editorconfig = {
indent_style: 'tab' // eslint-disable-line camelcase
};

expect(validateFile(`${process.cwd()}/.travis.yml`, editorconfig).length).toBeGreaterThan(0);
});

test(`should return an integer greater 0 for an invalid file`, () => {
test('should return an integer greater 0 for an invalid file', () => {
const filePath = `${process.cwd()}/Build/TestFiles/ValidationProcessor/README.md`;

const editorconfig = {
Expand All @@ -36,7 +36,7 @@ test(`should return an integer greater 0 for an invalid file`, () => {
expect(validateFile(filePath, editorconfig).length).toEqual(2);
});

test(`should return an integer greater 0 for an invalid file`, () => {
test('should return an integer greater 0 for an invalid file', () => {
const filePath = `${process.cwd()}/Build/TestFiles/ValidationProcessor/noFinalNewline.js`;

const editorconfig = {
Expand All @@ -47,7 +47,7 @@ test(`should return an integer greater 0 for an invalid file`, () => {
expect(validateFile(filePath, editorconfig).length).toEqual(1);
});

test(`should return an integer greater 0 for an invalid file`, () => {
test('should return an integer greater 0 for an invalid file', () => {
const filePath = `${process.cwd()}/Build/TestFiles/ValidationProcessor/wrongLineEnding.js`;

const editorconfig = {
Expand All @@ -57,7 +57,7 @@ test(`should return an integer greater 0 for an invalid file`, () => {
expect(validateFile(filePath, editorconfig).length).toEqual(1);
});

test(`should return 0 if the false line is disabled`, () => {
test('should return 0 if the false line is disabled', () => {
const filePath = `${process.cwd()}/Build/TestFiles/DisablingRules/disable-line.js`;

const editorconfig = {
Expand All @@ -68,7 +68,7 @@ test(`should return 0 if the false line is disabled`, () => {
expect(validateFile(filePath, editorconfig).length).toEqual(0);
});

test(`should return 0 if the false line is disabled and inside a HTML comment`, () => {
test('should return 0 if the false line is disabled and inside a HTML comment', () => {
const filePath = `${process.cwd()}/Build/TestFiles/DisablingRules/disable-line.html`;

const editorconfig = {
Expand All @@ -80,7 +80,7 @@ test(`should return 0 if the false line is disabled and inside a HTML comment`,
expect(validateFile(filePath, editorconfig).length).toEqual(0);
});

test(`should return 0 if the file is disabled`, () => {
test('should return 0 if the file is disabled', () => {
const filePath = `${process.cwd()}/Build/TestFiles/DisablingRules/disable-file.js`;

const editorconfig = {
Expand All @@ -91,7 +91,7 @@ test(`should return 0 if the file is disabled`, () => {
expect(validateFile(filePath, editorconfig).length).toEqual(0);
});

test(`should return 0 if the file is disabled`, () => {
test('should return 0 if the file is disabled', () => {
const filePath = `${process.cwd()}/Build/TestFiles/DisablingRules/disable-file.html`;

const editorconfig = {
Expand Down
Loading

0 comments on commit e33866c

Please sign in to comment.