aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/components/__tests__
diff options
context:
space:
mode:
authorStas Vilchik <stas-vilchik@users.noreply.github.com>2017-03-17 09:10:48 +0100
committerGitHub <noreply@github.com>2017-03-17 09:10:48 +0100
commitde4365079bad2df3bdee2133576dc913ffbf1ab2 (patch)
treea522ccb952f0d37f454e8188e13b3dec3f731912 /server/sonar-web/src/main/js/components/__tests__
parent6a03df65cc0c91a26150ea172a2c480e07326ea1 (diff)
downloadsonarqube-de4365079bad2df3bdee2133576dc913ffbf1ab2.tar.gz
sonarqube-de4365079bad2df3bdee2133576dc913ffbf1ab2.zip
format code using prettier (#1774)
Diffstat (limited to 'server/sonar-web/src/main/js/components/__tests__')
-rw-r--r--server/sonar-web/src/main/js/components/__tests__/issue-test.js26
1 files changed, 20 insertions, 6 deletions
diff --git a/server/sonar-web/src/main/js/components/__tests__/issue-test.js b/server/sonar-web/src/main/js/components/__tests__/issue-test.js
index 10694b1ebee..b0483b8cc21 100644
--- a/server/sonar-web/src/main/js/components/__tests__/issue-test.js
+++ b/server/sonar-web/src/main/js/components/__tests__/issue-test.js
@@ -98,7 +98,10 @@ describe('Model', () => {
const spy = jest.fn();
issue._action = spy;
issue.plan('plan');
- expect(spy).toBeCalledWith({ data: { plan: 'plan', issue: 'issue-key' }, url: '/api/issues/plan' });
+ expect(spy).toBeCalledWith({
+ data: { plan: 'plan', issue: 'issue-key' },
+ url: '/api/issues/plan'
+ });
});
it('should unplan', () => {
@@ -106,7 +109,10 @@ describe('Model', () => {
const spy = jest.fn();
issue._action = spy;
issue.plan();
- expect(spy).toBeCalledWith({ data: { plan: undefined, issue: 'issue-key' }, url: '/api/issues/plan' });
+ expect(spy).toBeCalledWith({
+ data: { plan: undefined, issue: 'issue-key' },
+ url: '/api/issues/plan'
+ });
});
it('should set severity', () => {
@@ -123,7 +129,9 @@ describe('Model', () => {
describe('#getLinearLocations', () => {
it('should return single line location', () => {
- const issue = new Issue({ textRange: { startLine: 1, endLine: 1, startOffset: 0, endOffset: 10 } });
+ const issue = new Issue({
+ textRange: { startLine: 1, endLine: 1, startOffset: 0, endOffset: 10 }
+ });
const locations = issue.getLinearLocations();
expect(locations.length).toBe(1);
@@ -133,7 +141,9 @@ describe('Model', () => {
});
it('should return location not from 0', () => {
- const issue = new Issue({ textRange: { startLine: 1, endLine: 1, startOffset: 5, endOffset: 10 } });
+ const issue = new Issue({
+ textRange: { startLine: 1, endLine: 1, startOffset: 5, endOffset: 10 }
+ });
const locations = issue.getLinearLocations();
expect(locations.length).toBe(1);
@@ -143,7 +153,9 @@ describe('Model', () => {
});
it('should return 2-lines location', () => {
- const issue = new Issue({ textRange: { startLine: 2, endLine: 3, startOffset: 5, endOffset: 10 } });
+ const issue = new Issue({
+ textRange: { startLine: 2, endLine: 3, startOffset: 5, endOffset: 10 }
+ });
const locations = issue.getLinearLocations();
expect(locations.length).toBe(2);
@@ -157,7 +169,9 @@ describe('Model', () => {
});
it('should return 3-lines location', () => {
- const issue = new Issue({ textRange: { startLine: 4, endLine: 6, startOffset: 5, endOffset: 10 } });
+ const issue = new Issue({
+ textRange: { startLine: 4, endLine: 6, startOffset: 5, endOffset: 10 }
+ });
const locations = issue.getLinearLocations();
expect(locations.length).toBe(3);