Completed
Push — master ( fa6b88...a41527 )
by Raimund
16s
created

tests/store/storeHelper.spec.js (28 issues)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
import moment from 'moment'
0 ignored issues
show
'import' is only available in ES6 (use 'esversion: 6').

Generally using ECMAScript 6 specific syntax is fine if you are sure that it is already supported by all engines which are supposed to run this code.

Further Reading:

Loading history...
There should be a semicolon.

Requirement of semicolons purely is a coding style issue since JavaScript has specific rules about semicolons which are followed by all browsers.

Further Readings:

Loading history...
2
import { sort } from '@/store/storeHelper'
0 ignored issues
show
'import' is only available in ES6 (use 'esversion: 6').

Generally using ECMAScript 6 specific syntax is fine if you are sure that it is already supported by all engines which are supposed to run this code.

Further Reading:

Loading history...
There should be a semicolon.

Requirement of semicolons purely is a coding style issue since JavaScript has specific rules about semicolons which are followed by all browsers.

Further Readings:

Loading history...
3
4
global.moment = moment
0 ignored issues
show
There should be a semicolon.

Requirement of semicolons purely is a coding style issue since JavaScript has specific rules about semicolons which are followed by all browsers.

Further Readings:

Loading history...
5
6
const tasks = [
0 ignored issues
show
Backwards Compatibility introduced by
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
Loading history...
7
	{
8
		id: 1,
9
		due: '20191119T183901'
10
	},
11
	{
12
		id: 2,
13
		due: '20181119T183901'
14
	},
15
	{
16
		id: 3,
17
		due: null
18
	},
19
	{
20
		id: 4,
21
		due: '20151119T183901'
22
	},
23
]
0 ignored issues
show
There should be a semicolon.

Requirement of semicolons purely is a coding style issue since JavaScript has specific rules about semicolons which are followed by all browsers.

Further Readings:

Loading history...
24
25
describe('storeHelper', () => {
0 ignored issues
show
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').

Generally using ECMAScript 6 specific syntax is fine if you are sure that it is already supported by all engines which are supposed to run this code.

Further Reading:

Loading history...
26
	'use strict'
0 ignored issues
show
There should be a semicolon.

Requirement of semicolons purely is a coding style issue since JavaScript has specific rules about semicolons which are followed by all browsers.

Further Readings:

Loading history...
27
28
	it('Tests descending sort by due date.', () => {
0 ignored issues
show
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').

Generally using ECMAScript 6 specific syntax is fine if you are sure that it is already supported by all engines which are supposed to run this code.

Further Reading:

Loading history...
29
		const clonedTasks = tasks.slice(0)
0 ignored issues
show
Backwards Compatibility introduced by
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
Loading history...
There should be a semicolon.

Requirement of semicolons purely is a coding style issue since JavaScript has specific rules about semicolons which are followed by all browsers.

Further Readings:

Loading history...
30
		const expectedTasks = [tasks[3], tasks[1], tasks[0], tasks[2]]
0 ignored issues
show
Backwards Compatibility introduced by
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
Loading history...
There should be a semicolon.

Requirement of semicolons purely is a coding style issue since JavaScript has specific rules about semicolons which are followed by all browsers.

Further Readings:

Loading history...
31
		const receivedTasks = sort(clonedTasks, 'due', 0)
0 ignored issues
show
Backwards Compatibility introduced by
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
Loading history...
There should be a semicolon.

Requirement of semicolons purely is a coding style issue since JavaScript has specific rules about semicolons which are followed by all browsers.

Further Readings:

Loading history...
32
		expect(receivedTasks).toEqual(expectedTasks)
0 ignored issues
show
There should be a semicolon.

Requirement of semicolons purely is a coding style issue since JavaScript has specific rules about semicolons which are followed by all browsers.

Further Readings:

Loading history...
33
	})
0 ignored issues
show
There should be a semicolon.

Requirement of semicolons purely is a coding style issue since JavaScript has specific rules about semicolons which are followed by all browsers.

Further Readings:

Loading history...
34
35
	it('Tests ascending sort by due date.', () => {
0 ignored issues
show
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').

Generally using ECMAScript 6 specific syntax is fine if you are sure that it is already supported by all engines which are supposed to run this code.

Further Reading:

Loading history...
36
		const clonedTasks = tasks.slice(0)
0 ignored issues
show
Backwards Compatibility introduced by
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
Loading history...
There should be a semicolon.

Requirement of semicolons purely is a coding style issue since JavaScript has specific rules about semicolons which are followed by all browsers.

Further Readings:

Loading history...
37
		const expectedTasks = [tasks[2], tasks[0], tasks[1], tasks[3]]
0 ignored issues
show
Backwards Compatibility introduced by
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
Loading history...
There should be a semicolon.

Requirement of semicolons purely is a coding style issue since JavaScript has specific rules about semicolons which are followed by all browsers.

Further Readings:

Loading history...
38
		const receivedTasks = sort(clonedTasks, 'due', 1)
0 ignored issues
show
Backwards Compatibility introduced by
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
Loading history...
There should be a semicolon.

Requirement of semicolons purely is a coding style issue since JavaScript has specific rules about semicolons which are followed by all browsers.

Further Readings:

Loading history...
39
		expect(receivedTasks).toEqual(expectedTasks)
0 ignored issues
show
There should be a semicolon.

Requirement of semicolons purely is a coding style issue since JavaScript has specific rules about semicolons which are followed by all browsers.

Further Readings:

Loading history...
40
	})
0 ignored issues
show
There should be a semicolon.

Requirement of semicolons purely is a coding style issue since JavaScript has specific rules about semicolons which are followed by all browsers.

Further Readings:

Loading history...
41
})
0 ignored issues
show
There should be a semicolon.

Requirement of semicolons purely is a coding style issue since JavaScript has specific rules about semicolons which are followed by all browsers.

Further Readings:

Loading history...
42