Asper Header  1.0.14
The header injector extension
Loading...
Searching...
No Matches
commentGenerator.test.ts File Reference

Test suite for the CommentGenerator header generation system. More...

Go to the source code of this file.

Data Structures

class  MockTextDocument
 Mock implementation of VS Code TextDocument for testing purposes. More...
 
class  MockTextEditor
 Mock implementation of VS Code TextEditor for testing text editing operations. More...
 

Variables

import *as assert from assert
 
import *as vscode from vscode
 
import *as fs from fs promises
 
import *as path from path
 
 import { CommentGenerator } from '../modules/commentGenerator'
 
let mockActiveTextEditor
 
let mockShowInputBoxResponse
 
let mockShowQuickPickResponse
 
let mockEditOperations
 
text __pad0__
 
isInsert __pad1__
 
range __pad2__
 
range __pad3__
 The range that the line spans in the document.
 
lineNumber __pad4__
 Zero-based line number in the document.
 
rangeIncludingLineBreak __pad5__
 Range including the line break character.
 
firstNonWhitespaceCharacterIndex __pad6__
 Index of the first non-whitespace character.
 
isEmptyOrWhitespace __pad7__
 Whether the line is empty or contains only whitespace.
 
let originalActiveTextEditor
 
let originalShowInputBox
 
let originalShowQuickPick
 

Detailed Description

Test suite for the CommentGenerator header generation system.

Author
Henry Letellier
Version
1.0.10
Since
1.0.4
Date
2025

This test suite provides comprehensive coverage for the CommentGenerator module, testing header creation, injection, refresh, and management functionality with various file types, comment styles, and user interaction scenarios.

Definition in file commentGenerator.test.ts.

Variable Documentation

◆ __pad0__

text __pad0__

Definition at line 27 of file commentGenerator.test.ts.

◆ __pad1__

isInsert __pad1__

Definition at line 27 of file commentGenerator.test.ts.

◆ __pad2__

range __pad2__

Definition at line 27 of file commentGenerator.test.ts.

◆ __pad3__

range __pad3__

The range that the line spans in the document.

Definition at line 41 of file commentGenerator.test.ts.

◆ __pad4__

lineNumber __pad4__

Zero-based line number in the document.

Definition at line 43 of file commentGenerator.test.ts.

◆ __pad5__

rangeIncludingLineBreak __pad5__

Range including the line break character.

Definition at line 45 of file commentGenerator.test.ts.

◆ __pad6__

firstNonWhitespaceCharacterIndex __pad6__

Index of the first non-whitespace character.

Definition at line 47 of file commentGenerator.test.ts.

◆ __pad7__

isEmptyOrWhitespace __pad7__

Whether the line is empty or contains only whitespace.

Definition at line 49 of file commentGenerator.test.ts.

◆ assert

import* as assert from assert

Definition at line 14 of file commentGenerator.test.ts.

◆ import

import { CommentGenerator } from '../modules/commentGenerator'

Definition at line 18 of file commentGenerator.test.ts.

◆ mockActiveTextEditor

let mockActiveTextEditor

Definition at line 24 of file commentGenerator.test.ts.

◆ mockEditOperations

let mockEditOperations

Definition at line 27 of file commentGenerator.test.ts.

◆ mockShowInputBoxResponse

let mockShowInputBoxResponse

Definition at line 25 of file commentGenerator.test.ts.

◆ mockShowQuickPickResponse

let mockShowQuickPickResponse

Definition at line 26 of file commentGenerator.test.ts.

◆ originalActiveTextEditor

let originalActiveTextEditor

Definition at line 324 of file commentGenerator.test.ts.

◆ originalShowInputBox

let originalShowInputBox

Definition at line 325 of file commentGenerator.test.ts.

◆ originalShowQuickPick

let originalShowQuickPick

Definition at line 326 of file commentGenerator.test.ts.

◆ path

import* as path from path

Definition at line 17 of file commentGenerator.test.ts.

◆ promises

import* as fs from fs promises

Definition at line 16 of file commentGenerator.test.ts.

◆ vscode

import* as vscode from vscode

Definition at line 15 of file commentGenerator.test.ts.