Skip to content
This repository has been archived by the owner on Sep 30, 2019. It is now read-only.

Commit

Permalink
Minor casting tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
vsaarinen committed Jun 20, 2017
1 parent dfb207e commit 49b20cc
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/json-api/json-api-module-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ describe('json-api-module', () => {
email: 'fooman@foomail.com',
timestamp: 'fooo',
},
} as any as MinardDeployment;
} as MinardDeployment;

const commentModule = {} as CommentModule;
commentModule.getCommentCountForDeployment = async (deploymentId: number) => {
Expand Down Expand Up @@ -361,11 +361,11 @@ describe('json-api-module', () => {
const latestCommitReturnedFromToApiCommit = {
id: '5-foo-commit-id',
hash: 'foo-commit-hash',
};
} as ApiCommit;
const latestDeployedCommitFromToApiCommit = {
id: '5-bar-commit-id',
hash: 'bar-commit-hash',
};
} as ApiCommit;

it('should return valid ApiBranch when fetching of related data succeeds', async () => {
// Arrange
Expand All @@ -389,10 +389,10 @@ describe('json-api-module', () => {
jsonApiModule.toApiCommit = async(_projectId: number, commit: MinardCommit, _deployments?: ApiDeployment[]) => {
expect(commit).to.exist;
if (commit.id === minardBranch.latestCommit.id) {
return latestCommitReturnedFromToApiCommit as ApiCommit;
return latestCommitReturnedFromToApiCommit;
}
if (commit.id === minardDeployment.commit.id) {
return latestDeployedCommitFromToApiCommit as ApiCommit;
return latestDeployedCommitFromToApiCommit;
}
throw Error('invalid params to toApiCommit');
};
Expand Down

0 comments on commit 49b20cc

Please sign in to comment.