@@ -10,7 +10,7 @@ describe('AggregationSettings', () => {
10
10
let settings : AggregationSettings ;
11
11
12
12
beforeEach ( ( ) => {
13
- // Создаем мок для AggregationColumnStore
13
+ // Creating a mock for AggregationColumnStore
14
14
columnStore = mock < AggregationColumnStore > ( {
15
15
getColumnIds : ( from , to ) => {
16
16
const result = [ ] ;
@@ -20,11 +20,11 @@ describe('AggregationSettings', () => {
20
20
return result ;
21
21
} ,
22
22
validateColumns : ( columns ) => {
23
- // Простая проверка - все колонки должны начинаться с 'col'
23
+ // Simple check - all columns must start with 'col'
24
24
return columns . every ( col => typeof col === 'string' && col . startsWith ( 'col' ) ) ;
25
25
} ,
26
26
validateAggregate : ( colId , funcId ) => {
27
- // Проверка - валидные функции : 'sum', 'avg', 'min', 'max', 'count'
27
+ // Check - valid functions : 'sum', 'avg', 'min', 'max', 'count'
28
28
const validFuncs = [ 'sum' , 'avg' , 'min' , 'max' , 'count' ] ;
29
29
return typeof colId === 'string' &&
30
30
colId . startsWith ( 'col' ) &&
@@ -126,18 +126,18 @@ describe('AggregationSettings', () => {
126
126
} ) ;
127
127
128
128
it ( 'should check if settings are valid' , ( ) => {
129
- // Несуществующие группы и агрегаты -> невалидно
129
+ // Non-existent groups and aggregates -> invalid
130
130
expect ( settings . isValid ( ) ) . toBe ( false ) ;
131
131
132
- // Только группы -> невалидно
132
+ // Only groups -> invalid
133
133
settings . addGroup ( { columns : [ 'col1' ] } ) ;
134
134
expect ( settings . isValid ( ) ) . toBe ( false ) ;
135
135
136
- // Группы и агрегаты -> валидно
136
+ // Groups and aggregates -> valid
137
137
settings . addAggregateColumn ( 'col2' , 'sum' ) ;
138
138
expect ( settings . isValid ( ) ) . toBe ( true ) ;
139
139
140
- // Только агрегаты и тотал -> валидно
140
+ // Only aggregates and totals -> valid
141
141
settings . clear ( ) ;
142
142
settings . addAggregateColumn ( 'col1' , 'sum' ) ;
143
143
settings . addGrandTotals ( ) ;
0 commit comments