UNPKG

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.

17 lines (15 loc) 624 B
require('qtests/setup'); const { test, expect, describe } = require('@jest/globals'); const path = require('path'); const utils = require('../utils'); describe('normalizePath', () => { test('normalizes windows and posix paths consistently', () => { const winPath = 'dir\\sub\\file.js'; const posixPath = 'dir/sub/file.js'; const mixedPath = 'dir\\sub/file.js'; const expected = ['dir', 'sub', 'file.js'].join(path.sep); expect(utils.normalizePath(winPath)).toBe(expected); expect(utils.normalizePath(posixPath)).toBe(expected); expect(utils.normalizePath(mixedPath)).toBe(expected); }); });