diff options
| author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2024-02-16 19:33:24 -0500 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-02-17 00:33:24 +0000 | 
| commit | 1e69210b53151f31140bb1fbdc9f3d71fa181630 (patch) | |
| tree | c8e824b531bf0fc46897ee7cf93fe375b5da946e /test/text-source-map.test.js | |
| parent | 9432e4bb117869860db0aaa42a318fe73002d1c5 (diff) | |
Make vitests idiomatic (#677)
Diffstat (limited to 'test/text-source-map.test.js')
| -rw-r--r-- | test/text-source-map.test.js | 26 | 
1 files changed, 2 insertions, 24 deletions
| diff --git a/test/text-source-map.test.js b/test/text-source-map.test.js index 18252627..09341774 100644 --- a/test/text-source-map.test.js +++ b/test/text-source-map.test.js @@ -19,8 +19,7 @@  import {describe, expect, test} from 'vitest';  import {TextSourceMap} from '../ext/js/general/text-source-map.js'; -/** */ -function testSource() { +describe('TextSourceMap', () => {      describe('Source', () => {          const data = [              ['source1'], @@ -33,10 +32,7 @@ function testSource() {              expect(source).toStrictEqual(sourceMap.source);          });      }); -} -/** */ -function testEquals() {      describe('Equals', () => {          /** @type {[args1: [source1: string, mapping1: ?(number[])], args2: [source2: string, mapping2: ?(number[])], expectedEquals: boolean][]} */          const data = [ @@ -77,10 +73,7 @@ function testEquals() {              expect(sourceMap1.equals(sourceMap2)).toStrictEqual(expectedEquals);          });      }); -} -/** */ -function testGetSourceLength() {      describe('GetSourceLength', () => {          /** @type {[args: [source: string, mapping: number[]], finalLength: number, expectedValue: number][]} */          const data = [ @@ -106,10 +99,7 @@ function testGetSourceLength() {              expect(sourceMap.getSourceLength(finalLength)).toStrictEqual(expectedValue);          });      }); -} -/** */ -function testCombineInsert() {      describe('CombineInsert', () => {          /** @type {[args: [source: string, mapping: ?(number[])], expectedArgs: [expectedSource: string, expectedMapping: ?(number[])], operations: [operation: string, arg1: number, arg2: number][]][]} */          const data = [ @@ -230,16 +220,4 @@ function testCombineInsert() {              expect(sourceMap.equals(expectedSourceMap)).toBe(true);          });      }); -} - - -/** */ -function main() { -    testSource(); -    testEquals(); -    testGetSourceLength(); -    testCombineInsert(); -} - - -main(); +}); |