unqommented
Version:
A Node.js utility that quickly identifies files with uncommented code in your codebase. Designed for developers who want to efficiently tell LLMs exactly which files need comments added.
14 lines (12 loc) • 691 B
JavaScript
require('qtests/setup');
const { test, expect, describe } = require('@jest/globals');
const utils = require('../utils');
const localVars = require('../../config/localVars');
describe('createLimiter validation', () => {
test('throws when max is not a positive integer', () => {
expect(() => utils.createLimiter(0)).toThrow(localVars.ERROR_MESSAGES.LIMIT_NOT_POSITIVE_INT);
expect(() => utils.createLimiter(-1)).toThrow(localVars.ERROR_MESSAGES.LIMIT_NOT_POSITIVE_INT);
expect(() => utils.createLimiter(1.2)).toThrow(localVars.ERROR_MESSAGES.LIMIT_NOT_POSITIVE_INT);
expect(() => utils.createLimiter('3')).toThrow(localVars.ERROR_MESSAGES.LIMIT_NOT_POSITIVE_INT);
});
});