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) • 633 B
JavaScript
require('qtests/setup'); // mock modules for testing
const { test, expect, describe } = require('@jest/globals'); // jest globals
const utils = require('../utils'); // library utils
const localVars = require('../../config/localVars'); // constant values
describe('findUncommentedFiles nonexistent directory', () => {
test('rejects when directory does not exist', async () => {
// Use a guaranteed missing path to trigger error handling
await expect(utils.findUncommentedFiles('/path/does/not/exist'))
.rejects
.toThrow(localVars.ERROR_MESSAGES.DIR_NOT_EXIST_PREFIX); // message should contain prefix
});
});