Skip to content

Commit

Permalink
fixup! remove unnecessary return statements
Browse files Browse the repository at this point in the history
Remove unnecessary return statments which don't get
tested. Also intended to increase coverage.
  • Loading branch information
biniam committed Jan 15, 2018
1 parent c46ca1b commit d2dfd67
Showing 1 changed file with 12 additions and 36 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@ describe('Routing metadata', () => {

@api(expectedSpec)
class MyController {
greet() {
return 'Hello world!';
}
greet() {}
}

const actualSpec = getControllerSpec(MyController);
Expand All @@ -42,9 +40,7 @@ describe('Routing metadata', () => {

@api(expectedSpec)
class MyController {
greet() {
return 'Hello world!';
}
greet() {}
}

const spec1 = getControllerSpec(MyController);
Expand All @@ -57,9 +53,7 @@ describe('Routing metadata', () => {

class MyController {
@get('/greet', operationSpec)
greet() {
return 'Hello world!';
}
greet() {}
}

const actualSpec = getControllerSpec(MyController);
Expand Down Expand Up @@ -169,9 +163,7 @@ describe('Routing metadata', () => {

class MyController {
@head('/greeting', operationSpec)
greet() {
return 'Hello world!';
}
greet() {}
}

const actualSpec = getControllerSpec(MyController);
Expand Down Expand Up @@ -245,16 +237,12 @@ describe('Routing metadata', () => {

class Parent {
@get('/parent', operationSpec)
getParentName() {
return 'The Parent';
}
getParentName() {}
}

class Child extends Parent {
@get('/child', operationSpec)
getChildName() {
return 'The Child';
}
getChildName() {}
}

const actualSpec = getControllerSpec(Child);
Expand Down Expand Up @@ -282,16 +270,12 @@ describe('Routing metadata', () => {

class Parent {
@get('/name', operationSpec)
getParentName() {
return 'The Parent';
}
getParentName() {}
}

class Child extends Parent {
@get('/name', operationSpec)
getChildName() {
return 'The Child';
}
getChildName() {}
}

const actualSpec = getControllerSpec(Child);
Expand All @@ -309,16 +293,12 @@ describe('Routing metadata', () => {

class Parent {
@get('/parent-name', operationSpec)
getName() {
return 'The Parent';
}
getName() {}
}

class Child extends Parent {
@get('/child-name', operationSpec)
getName() {
return 'The Child';
}
getName() {}
}

const childSpec = getControllerSpec(Child);
Expand Down Expand Up @@ -348,15 +328,11 @@ describe('Routing metadata', () => {

class Parent {
@get('/greet', operationSpec)
greet(@param.query.string('msg') msg: string) {
return `Parent: ${msg}`;
}
greet(@param.query.string('msg') msg: string) {}
}

class Child extends Parent {
greet(@param.query.string('message') msg: string) {
return `Child: ${msg}`;
}
greet(@param.query.string('message') msg: string) {}
}

const childSpec = getControllerSpec(Child);
Expand Down

0 comments on commit d2dfd67

Please sign in to comment.