Skip to content

Commit

Permalink
Remove async from describe function tests round.js
Browse files Browse the repository at this point in the history
  • Loading branch information
michielmulders committed Feb 12, 2019
1 parent 25354ed commit 5076fae
Showing 1 changed file with 23 additions and 23 deletions.
46 changes: 23 additions & 23 deletions framework/test/unit/components/storage/entities/round.js
Expand Up @@ -42,7 +42,7 @@ const checkTableExists = (adapter, tableName) =>
)
.then(result => result[0].exists);

describe('Round', async () => {
describe('Round', () => {
let adapter;
let storage;
let RoundEntity;
Expand Down Expand Up @@ -133,7 +133,7 @@ describe('Round', async () => {
expect(Round.prototype instanceof BaseEntity).to.be.true;
});

describe('constructor()', async () => {
describe('constructor()', () => {
it('should accept only one mandatory parameter', async () => {
expect(Round.prototype.constructor.length).to.be.eql(1);
});
Expand Down Expand Up @@ -172,7 +172,7 @@ describe('Round', async () => {
it('should setup specific filters');
});

describe('getOne()', async () => {
describe('getOne()', () => {
it('should call _getResults with the correct expectedResultCount', async () => {
const round = new Round(adapter);
const _getResultsStub = sinonSandbox
Expand All @@ -195,7 +195,7 @@ describe('Round', async () => {
});
});

describe('get()', async () => {
describe('get()', () => {
it('should call _getResults with the correct expectedResultCount', async () => {
const round = new Round(adapter);
const _getResultsStub = sinonSandbox
Expand All @@ -222,7 +222,7 @@ describe('Round', async () => {
});
});

describe('_getResults()', async () => {
describe('_getResults()', () => {
beforeEach(async () => {
await storage.entities.Round.create(validRound);
});
Expand Down Expand Up @@ -259,7 +259,7 @@ describe('Round', async () => {

it('should not change any of the provided parameter');

describe('filters', async () => {
describe('filters', () => {
// To make add/remove filters we add their tests.
it('should have only specific filters', async () => {
expect(RoundEntity.getFilters()).to.eql(validFilters);
Expand All @@ -269,7 +269,7 @@ describe('Round', async () => {
});
});

describe('isPersisted()', async () => {
describe('isPersisted()', () => {
beforeEach(async () => {
await RoundEntity.create(validRound);
});
Expand Down Expand Up @@ -357,7 +357,7 @@ describe('Round', async () => {
});
});

describe('create()', async () => {
describe('create()', () => {
it('should save single round', async () => {
const randRound = new roundsFixtures.Round();
await RoundEntity.create(randRound);
Expand All @@ -381,7 +381,7 @@ describe('Round', async () => {
});
});

describe('delete', async () => {
describe('delete', () => {
it('should accept only valid filters', async () => {
const randRound = new roundsFixtures.Round();
expect(() => {
Expand Down Expand Up @@ -447,7 +447,7 @@ describe('Round', async () => {
});
});

describe('getUniqueRounds()', async () => {
describe('getUniqueRounds()', () => {
it('should return unique round numbers', async () => {
const round1 = new roundsFixtures.Round({
round: 1,
Expand All @@ -472,7 +472,7 @@ describe('Round', async () => {
});
});

describe('getTotalVotedAmount', async () => {
describe('getTotalVotedAmount', () => {
it('should use the correct SQL file', async () => {
sinonSandbox.spy(adapter, 'executeFile');
await RoundEntity.getTotalVotedAmount({ round: 1 });
Expand Down Expand Up @@ -522,7 +522,7 @@ describe('Round', async () => {
expect(RoundEntity.getTotalVotedAmount({ round: 1234 })).to.be.fulfilled);
});

describe('summedRound()', async () => {
describe('summedRound()', () => {
it('should use the correct SQL file with one parameter', async () => {
sinonSandbox.spy(adapter, 'executeFile');
await RoundEntity.summedRound(1, 2);
Expand Down Expand Up @@ -561,7 +561,7 @@ describe('Round', async () => {
});
});

describe('createRoundRewards()', async () => {
describe('createRoundRewards()', () => {
it('should use the correct SQL file with five parameters', async () => {
sinonSandbox.spy(adapter, 'executeFile');
const params = {
Expand Down Expand Up @@ -599,7 +599,7 @@ describe('Round', async () => {
});
});

describe('deleteRoundRewards()', async () => {
describe('deleteRoundRewards()', () => {
it('should use the correct SQL file with five parameters', async () => {
sinonSandbox.spy(adapter, 'executeFile');
await RoundEntity.deleteRoundRewards('1');
Expand Down Expand Up @@ -645,7 +645,7 @@ describe('Round', async () => {
});
});

describe('clearRoundSnapshot()', async () => {
describe('clearRoundSnapshot()', () => {
it('should use the correct SQL file with no parameters', async () => {
sinonSandbox.spy(adapter, 'executeFile');
await RoundEntity.clearRoundSnapshot();
Expand Down Expand Up @@ -677,7 +677,7 @@ describe('Round', async () => {
});
});

describe('performRoundSnapshot()', async () => {
describe('performRoundSnapshot()', () => {
afterEach(() => RoundEntity.clearRoundSnapshot());

it('should use the correct SQL file with no parameters', async () => {
Expand Down Expand Up @@ -726,7 +726,7 @@ describe('Round', async () => {
});
});

describe('checkSnapshotAvailability()', async () => {
describe('checkSnapshotAvailability()', () => {
afterEach(() => RoundEntity.clearRoundSnapshot());

it('should use the correct SQL file with one parameter', async () => {
Expand Down Expand Up @@ -796,7 +796,7 @@ describe('Round', async () => {
));
});

describe('countRoundSnapshot()', async () => {
describe('countRoundSnapshot()', () => {
afterEach(() => RoundEntity.clearRoundSnapshot());

it('should use the correct SQL file with one parameter', async () => {
Expand Down Expand Up @@ -851,7 +851,7 @@ describe('Round', async () => {
));
});

describe('getDelegatesSnapshot()', async () => {
describe('getDelegatesSnapshot()', () => {
afterEach(() => RoundEntity.clearVotesSnapshot());

it('should reject with error if the called without performing the snapshot', async () =>
Expand Down Expand Up @@ -940,7 +940,7 @@ describe('Round', async () => {
});
});

describe('clearVotesSnapshot()', async () => {
describe('clearVotesSnapshot()', () => {
it('should use the correct SQL file with no parameters', async () => {
sinonSandbox.spy(adapter, 'executeFile');
await RoundEntity.clearVotesSnapshot();
Expand Down Expand Up @@ -971,7 +971,7 @@ describe('Round', async () => {
});
});

describe('performVotesSnapshot()', async () => {
describe('performVotesSnapshot()', () => {
afterEach(() => RoundEntity.clearVotesSnapshot());

it('should use the correct SQL file with no parameters', async () => {
Expand Down Expand Up @@ -1038,7 +1038,7 @@ describe('Round', async () => {
});
});

describe('restoreRoundSnapshot()', async () => {
describe('restoreRoundSnapshot()', () => {
afterEach(() => RoundEntity.clearRoundSnapshot());

it('should reject with error if the called without performing the snapshot', async () =>
Expand Down Expand Up @@ -1094,7 +1094,7 @@ describe('Round', async () => {
});
});

describe('restoreVotesSnapshot()', async () => {
describe('restoreVotesSnapshot()', () => {
afterEach(() => RoundEntity.clearVotesSnapshot());

it('should reject with error if the called without performing the snapshot', async () =>
Expand Down

0 comments on commit 5076fae

Please sign in to comment.