Grouped MaxLimit test cases into describe groups

refs https://github.com/TryGhost/Team/issues/587

- Clenup before adding even more test coverage
This commit is contained in:
Naz 2021-04-01 18:03:32 +13:00
parent 73e7319406
commit 3bcc4256f5

View File

@ -6,6 +6,7 @@ const {MaxLimit} = require('../lib/limit');
describe('Limit Service', function () {
describe('Max Limit', function () {
describe('Constructor', function () {
it('throws if initialized without a max limit', function () {
const config = {};
@ -31,7 +32,9 @@ describe('Limit Service', function () {
should.equal(err.errorType, 'IncorrectUsageError');
}
});
});
describe('Would go over limit', function () {
it('throws if would go over the limit', async function () {
const config = {
max: 1,
@ -96,4 +99,5 @@ describe('Limit Service', function () {
}
});
});
});
});