Skip to content

Commit

Permalink
Merge pull request #58 from stefanschramm/vitest
Browse files Browse the repository at this point in the history
Switch to vitest
  • Loading branch information
stefanschramm authored Jan 11, 2025
2 parents e04bfae + a742aae commit b4aed1a
Show file tree
Hide file tree
Showing 16 changed files with 1,871 additions and 4,160 deletions.
6,001 changes: 1,850 additions & 4,151 deletions package-lock.json

Large diffs are not rendered by default.

15 changes: 7 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,13 @@
"lint": "npm run lint --ws"
},
"devDependencies": {
"@eslint/js": "^9.13.0",
"@stylistic/eslint-plugin-ts": "^2.9.0",
"@eslint/js": "^9.18.0",
"@stylistic/eslint-plugin-ts": "^2.12.1",
"@types/eslint__js": "^8.42.3",
"@types/jest": "^29.5.11",
"eslint": "^9.13.0",
"jest": "^29.7.0",
"ts-jest": "^29.1.1",
"typescript": "^5.6.3",
"typescript-eslint": "^8.10.0"
"@types/node": "^22.10.5",
"eslint": "^9.18.0",
"typescript": "^5.7.3",
"typescript-eslint": "^8.19.1",
"vitest": "^2.1.8"
}
}
2 changes: 1 addition & 1 deletion retroload-lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
],
"scripts": {
"lint": "eslint src/",
"test": "jest",
"test": "vitest run",
"test-watch": "jest --watch",
"coverage": "jest --coverage",
"updateVersion": "genversion --es6 -s src/version.ts"
Expand Down
1 change: 1 addition & 0 deletions retroload-lib/src/common/BufferAccess.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import {expect, test} from 'vitest';
import {BufferAccess} from './BufferAccess.js';

test('length', () => {
Expand Down
1 change: 1 addition & 0 deletions retroload-lib/src/common/Exceptions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
MissingOptionsError,
UsageError,
} from './Exceptions.js';
import {describe, expect, test} from 'vitest';
import {type ArgumentOptionDefinition} from '../encoding/Options.js';

describe('Instantiation of exceptions', () => {
Expand Down
1 change: 1 addition & 0 deletions retroload-lib/src/common/Utils.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {calculateChecksum8, hex16, hex8} from './Utils.js';
import {describe, expect, test} from 'vitest';
import {BufferAccess} from './BufferAccess.js';

describe('Utils', () => {
Expand Down
1 change: 1 addition & 0 deletions retroload-lib/src/decoding/DynamicSyncFinder.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import {describe, expect, test} from 'vitest';
import {DynamicSyncFinder} from './DynamicSyncFinder.js';
import {type HalfPeriodProvider} from './half_period_provider/HalfPeriodProvider.js';
import {type Position} from '../common/Positioning.js';
Expand Down
1 change: 1 addition & 0 deletions retroload-lib/src/decoding/SyncFinder.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import {describe, expect, test} from 'vitest';
import {type FrequencyRange} from './Frequency.js';
import {type HalfPeriodProvider} from './half_period_provider/HalfPeriodProvider.js';
import {type Position} from '../common/Positioning.js';
Expand Down
1 change: 1 addition & 0 deletions retroload-lib/src/decoding/decoder/Decoders.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import {expect, test} from 'vitest';
import decoders from './Decoders.js';

test('DecoderProvider provides decoders', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {BlockDecodingResult, BlockDecodingResultStatus} from '../BlockDecodingResult.js';
import {describe, expect, test} from 'vitest';
import {BufferAccess} from '../../../common/BufferAccess.js';
import {DecodingError} from '../../DecoderExceptions.js';
import {FileDecodingResultStatus} from '../FileDecodingResult.js';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import {expect, test} from 'vitest';
import {AveragingSampleToHalfPeriodConverter} from './AveragingSampleToHalfPeriodConverter.js';
import {type HalfPeriodProvider} from './HalfPeriodProvider.js';
import {SampleProviderMock} from '../../test/mocks/SampleProviderMock.js';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import {describe, expect, test} from 'vitest';
import {BufferAccess} from '../../common/BufferAccess.js';
import {InputDataError} from '../../common/Exceptions.js';
import {WaveFileSampleProvider} from './WaveFileSampleProvider.js';
Expand Down
1 change: 1 addition & 0 deletions retroload-lib/src/encoding/AdapterManager.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import * as AdapterManager from './AdapterManager.js';
import * as crypto from 'crypto';
import * as fs from 'fs';
import {describe, expect, it, test} from 'vitest';
import examples, {type ExampleDefinition, getLocalPath} from '../Examples.js';
import {BufferAccess} from '../common/BufferAccess.js';
import {Logger} from '../common/logging/Logger.js';
Expand Down
1 change: 1 addition & 0 deletions retroload-lib/src/encoding/Adapters.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import {describe, expect, test} from 'vitest';
import Adapters from './Adapters.js';
import {BufferAccess} from '../common/BufferAccess.js';

Expand Down
1 change: 1 addition & 0 deletions retroload-lib/src/encoding/recorder/Annotations.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import {expect, test} from 'vitest';
import {AnnotationCollector} from './Annotations.js';
import {InternalError} from '../../common/Exceptions.js';

Expand Down
1 change: 1 addition & 0 deletions retroload-lib/src/tokenizing/Tokenizers.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import {describe, expect, test} from 'vitest';
import {fixturesBaseDir} from '../test/Fixtures.js';
import fs from 'fs';
import tokenizers from './Tokenizers.js';
Expand Down

0 comments on commit b4aed1a

Please sign in to comment.