Skip to content

Commit 1fb7010

Browse files
authored
Merge branch 'develop' into feature/issue-1194
2 parents 4c7947a + 48647e5 commit 1fb7010

32 files changed

+154
-130
lines changed

.eslintrc.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,13 @@ module.exports = {
66
'@typescript-eslint',
77
'license-header',
88
'jsdoc',
9+
'jasmine',
10+
'jest',
911
],
12+
env: {
13+
jasmine: true,
14+
'jest/globals': true,
15+
},
1016
parserOptions: {
1117
tsconfigRootDir: __dirname,
1218
project: './tsconfig.test.json',
@@ -17,6 +23,9 @@ module.exports = {
1723
'plugin:@typescript-eslint/eslint-recommended',
1824
'plugin:@typescript-eslint/recommended',
1925
'plugin:@typescript-eslint/recommended-requiring-type-checking',
26+
'plugin:jasmine/recommended',
27+
'plugin:jest/recommended',
28+
'plugin:jest/style',
2029
],
2130
rules: {
2231
// Automatic fixers
@@ -113,6 +122,13 @@ module.exports = {
113122
MethodDefinition: true,
114123
}
115124
}],
125+
'jest/no-jasmine-globals': 'off',
126+
'jest/no-alias-methods': 'off',
127+
'jest/no-conditional-expect': 'warn',
128+
'jest/no-standalone-expect': 'warn',
129+
'jest/no-test-prefixes': 'off',
130+
'jest/prefer-to-be': 'warn',
131+
'jest/prefer-to-have-length': 'warn',
116132
},
117133
overrides: [
118134
{

docs/guide/compatibility-with-microsoft-excel.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,17 @@ That said, there are cases when HyperFormula can't be compatible with all three
1313

1414
Still, with the right configuration, you can achieve nearly full compatibility.
1515

16+
### Excel function coverage
17+
18+
HyperFormula implements **350 out of 515 Excel functions** (68% coverage), as of version 3.1.0 and Excel 2024. This means that **165 Excel functions** (32%) are not yet available in HyperFormula.
19+
20+
Additionally, HyperFormula includes some functions that are not part of Excel's standard function set, bringing the total number of available functions to **{{ $page.functionsCount }}**.
21+
22+
For a complete list of supported functions, see the [built-in functions](built-in-functions.md) page.
23+
24+
If you need any of the missing Excel functions, you can [contact us](contact.md) or implement them as [custom functions](custom-functions.md), extending HyperFormula's capabilities to meet your specific requirements.
25+
26+
1627
## Configure compatibility with Microsoft Excel
1728

1829
### String comparison rules

package-lock.json

Lines changed: 67 additions & 28 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,8 @@
133133
"env-cmd": "^10.1.0",
134134
"eslint": "^8.57.1",
135135
"eslint-config-prettier": "^9.1.0",
136+
"eslint-plugin-jasmine": "^4.2.2",
137+
"eslint-plugin-jest": "^27.9.0",
136138
"eslint-plugin-jsdoc": "^50.5.0",
137139
"eslint-plugin-license-header": "^0.6.1",
138140
"eslint-plugin-prettier": "^5.2.1",

test/unit/AbsoluteCellRange.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ describe('AbsoluteCellRange', () => {
77
it('true in simplest case', () => {
88
const range = AbsoluteCellRange.fromCoordinates(0, 0, 0, 0, 0)
99

10-
expect(range.addressInRange(adr('A1')))
10+
expect(range.addressInRange(adr('A1'))).toBe(true)
1111
})
1212

1313
it('false if different sheets', () => {
1414
const range = AbsoluteCellRange.fromCoordinates(1, 0, 0, 0, 0)
1515

16-
expect(range.addressInRange(adr('A1')))
16+
expect(range.addressInRange(adr('A1'))).toBe(false)
1717
})
1818
})
1919

test/unit/_setupFiles/jest/bootstrap.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import {toEqualError} from './toEqualError'
33
beforeAll(() => {
44
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
55
// @ts-ignore
6+
// eslint-disable-next-line no-global-assign
67
spyOn = jest.spyOn
78
expect.extend(toEqualError)
89
})

test/unit/arrays.spec.ts

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,6 @@ describe('build from array', () => {
380380
[undefined, ArrayVertex, ArrayVertex],
381381
])
382382
expect(engine.arrayMapping.arrayMapping.size).toEqual(4)
383-
expect(engine.getSheetValues(0))
384383
})
385384

386385
it('should REF last array', () => {
@@ -399,7 +398,6 @@ describe('build from array', () => {
399398
[noSpace(), 2, 2, 1, 2],
400399
])
401400
expect(engine.arrayMapping.arrayMapping.size).toEqual(3)
402-
expect(engine.getSheetValues(0))
403401
})
404402

405403
it('array should work with different types of data', () => {
@@ -490,15 +488,6 @@ describe('column ranges', () => {
490488
expect(engine.getCellValue(adr('A2'))).toEqualError(detailedError(ErrorType.SPILL, ErrorMessage.NoSpaceForArrayResult))
491489
})
492490

493-
it('arithmetic should work for row range', () => {
494-
const engine = HyperFormula.buildFromArray([
495-
['=2*(2:2)', null],
496-
[1, 2],
497-
], {useArrayArithmetic: true})
498-
499-
expect(engine.getSheetValues(0)).toEqual([[2, 4], [1, 2]])
500-
})
501-
502491
it('arithmetic for shifted row range -- error', () => {
503492
const engine = HyperFormula.buildFromArray([
504493
[null, '=2*(2:2)'],

test/unit/column-index.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ describe('ColumnIndex#removeColumns', () => {
297297
expect(index.getValueIndex(0, 0, 1).index).toEqual([])
298298
})
299299

300-
it('should remove multiple columns in the middle ', () => {
300+
it('should remove multiple columns in the middle', () => {
301301
const index = buildEmptyIndex(transformingService, new Config(), statistics)
302302
index.add(1, adr('A1'))
303303
index.add(2, adr('B1'))
@@ -312,7 +312,7 @@ describe('ColumnIndex#removeColumns', () => {
312312
expect(index.getValueIndex(0, 3, 4).index).toEqual([])
313313
})
314314

315-
it('should remove columns only in one sheet ', () => {
315+
it('should remove columns only in one sheet', () => {
316316
const index = buildEmptyIndex(transformingService, new Config(), statistics)
317317
index.add(1, adr('A1', 0))
318318
index.add(1, adr('A1', 1))
@@ -456,7 +456,7 @@ describe('ColumnIndex#removeRows', () => {
456456
expect(index.getValueIndex(0, 0, 1).index).toEqual([])
457457
})
458458

459-
it('should remove rows in the middle ', () => {
459+
it('should remove rows in the middle', () => {
460460
const statistics = new Statistics()
461461
const transformingService = new LazilyTransformingAstService(statistics)
462462
const index = buildEmptyIndex(transformingService, new Config(), statistics)

test/unit/cruds/adding-columns-dependencies.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ describe('Adding column, fixing ranges', () => {
316316
]))
317317
})
318318

319-
it('it should insert new cell with edge to only one range at right', () => {
319+
it('should insert new cell with edge to only one range at right', () => {
320320
const engine = HyperFormula.buildFromArray([
321321
['1', '2', /* */ '3', '4'],
322322
['=SUM(A1:A1)', '=SUM(A1:B1)', /* */ '=SUM(A1:C1)', '=SUM(A1:D1)'],

test/unit/cruds/adding-row-dependencies.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ describe('Adding row, ranges', () => {
332332
]))
333333
})
334334

335-
it('it should insert new cell with edge to all ranges below', () => {
335+
it('should insert new cell with edge to all ranges below', () => {
336336
const engine = HyperFormula.buildFromArray([
337337
['1', '=SUM(A1:A1)'],
338338
['2', '=SUM(A1:A2)'],
@@ -358,7 +358,7 @@ describe('Adding row, ranges', () => {
358358
expect(engine.graph.adjacentNodesCount(a2)).toBe(1)
359359
})
360360

361-
it('it should insert new cell with edge to only one range below, shifted by 1', () => {
361+
it('should insert new cell with edge to only one range below, shifted by 1', () => {
362362
const engine = HyperFormula.buildFromArray([
363363
['1', null],
364364
['2', '=SUM(A1:A1)'],

0 commit comments

Comments
 (0)