Use helpers in other tests

This commit is contained in:
Daniel Imms
2026-03-09 13:03:00 +09:00
parent df5393ec45
commit 671425bf5a
7 changed files with 125 additions and 122 deletions
+1 -6
View File
@@ -8,6 +8,7 @@ import { CellData } from 'common/buffer/CellData';
import { CharData, IBufferLine } from '../Types';
import { assert } from 'chai';
import { AttributeData } from 'common/buffer/AttributeData';
import { createCellData, NULL_CELL_DATA } from 'common/TestUtils.test';
class TestBufferLine extends BufferLine {
@@ -24,12 +25,6 @@ class TestBufferLine extends BufferLine {
}
}
function createCellData(attr: number, char: string, width: number): CellData {
return CellData.fromCharData([attr, char, width, char.length === 0 ? 0 : char.charCodeAt(0)]);
}
const NULL_CELL_DATA = Object.freeze(createCellData(DEFAULT_ATTR, NULL_CELL_CHAR, NULL_CELL_WIDTH));
describe('AttributeData', () => {
describe('extended attributes', () => {
it('hasExtendedAttrs', () => {