diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2023-11-29 22:06:38 -0500 |
---|---|---|
committer | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2023-11-29 22:06:38 -0500 |
commit | 01142ef3d62e388a1c952ad9ea3a01ed38b518b6 (patch) | |
tree | 0ab39a1457d6c0c13c61d19cec0c3766a9125079 /test/text-source-map.test.js | |
parent | f0c5ef69ca1758d5ef9201bc8a4375e5933888be (diff) |
Update types
Diffstat (limited to 'test/text-source-map.test.js')
-rw-r--r-- | test/text-source-map.test.js | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/test/text-source-map.test.js b/test/text-source-map.test.js index aeaba000..54b39319 100644 --- a/test/text-source-map.test.js +++ b/test/text-source-map.test.js @@ -19,6 +19,7 @@ import {expect, test} from 'vitest'; import {TextSourceMap} from '../ext/js/general/text-source-map.js'; +/** */ function testSource() { test('Source', () => { const data = [ @@ -34,8 +35,10 @@ function testSource() { }); } +/** */ function testEquals() { test('Equals', () => { + /** @type {[args1: [source1: string, mapping1: ?(number[])], args2: [source2: string, mapping2: ?(number[])], expectedEquals: boolean][]} */ const data = [ [['source1', null], ['source1', null], true], [['source2', null], ['source2', null], true], @@ -76,8 +79,10 @@ function testEquals() { }); } +/** */ function testGetSourceLength() { test('GetSourceLength', () => { + /** @type {[args: [source: string, mapping: number[]], finalLength: number, expectedValue: number][]} */ const data = [ [['source', [1, 1, 1, 1, 1, 1]], 1, 1], [['source', [1, 1, 1, 1, 1, 1]], 2, 2], @@ -103,10 +108,12 @@ function testGetSourceLength() { }); } +/** */ function testCombineInsert() { test('CombineInsert', () => { + /** @type {[args: [source: string, mapping: ?(number[])], expectedArgs: [expectedSource: string, expectedMapping: ?(number[])], operations: [operation: string, arg1: number, arg2: number][]][]} */ const data = [ - // No operations + // No operations [ ['source', null], ['source', [1, 1, 1, 1, 1, 1]], @@ -226,6 +233,7 @@ function testCombineInsert() { } +/** */ function main() { testSource(); testEquals(); |