Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
611cae0
Run the tests under Vitest and remove Jest and Babel (#296)
jtklein-agents Nov 22, 2026
dca2548
Merge pull request #308 from jtklein-agents/296-run-the-tests-under-v…
jtklein-agents Nov 22, 2026
155dcaa
Rename the test support files to TypeScript
jtklein-agents Nov 22, 2026
5b002da
Rename the shell-config and e2e helper tests to .ts (#299)
jtklein-agents Nov 22, 2026
92b82f4
Rename the main-process tests to .ts (#298)
jtklein-agents Nov 22, 2026
141aca0
Type the main-process tests (#298)
jtklein-agents Nov 22, 2026
850637b
Type the shell-config and e2e helper tests (#299)
jtklein-agents Nov 22, 2026
e221285
Type the test support files and add installBridge
jtklein-agents Nov 22, 2026
3b44375
Merge pull request #310 from jtklein-agents/297-convert-the-test-supp…
jtklein-agents Nov 22, 2026
dd75d4b
Merge pull request #309 from jtklein-agents/298-convert-the-main-proc…
jtklein-agents Nov 22, 2026
babe07e
Merge remote-tracking branch 'origin/spec/295-replace-jest-and-babel-…
jtklein-agents Nov 22, 2026
79a182a
Rename the page tests outside the page store to TypeScript (#300)
jtklein-agents Nov 22, 2026
e8aff28
Rename the page store partition tests to .ts (#302)
jtklein-agents Nov 22, 2026
30487d9
Rename the page store alignment tests to .ts (#301)
jtklein-agents Nov 22, 2026
a9468d6
Type the page tests outside the page store (#300)
jtklein-agents Nov 22, 2026
54247b2
Skip TypeScript tests in the page Node-import scan (#304)
jtklein-agents Nov 22, 2026
b01c97c
Rename the run lifecycle, run list, start and cancel tests to .ts (#304)
jtklein-agents Nov 22, 2026
547d4cf
Type the page store partition tests (#302)
jtklein-agents Nov 22, 2026
e5e0a17
Type the page store alignment tests (#301)
jtklein-agents Nov 22, 2026
1c3e87c
Merge pull request #311 from jtklein-agents/299-convert-the-shell-con…
jtklein-agents Nov 22, 2026
6a2dfc6
Type the run lifecycle, run list, start and cancel tests (#304)
jtklein-agents Nov 22, 2026
37e333f
Merge pull request #312 from jtklein-agents/300-convert-the-page-test…
jtklein-agents Nov 22, 2026
17ac4ce
Merge pull request #314 from jtklein-agents/302-convert-the-page-stor…
jtklein-agents Nov 22, 2026
199221e
Merge pull request #313 from jtklein-agents/301-convert-the-page-stor…
jtklein-agents Nov 22, 2026
c1f027c
Merge remote-tracking branch 'origin/spec/295-replace-jest-and-babel-…
jtklein-agents Nov 22, 2026
35718bb
Merge pull request #315 from jtklein-agents/304-convert-the-page-stor…
jtklein-agents Nov 22, 2026
5e2e1c4
Rename the page store option tests to TypeScript
jtklein-agents Nov 22, 2026
4b5d66f
Rename the page store citation, host, menu and small bridge-call test…
jtklein-agents Nov 22, 2026
5cd3faf
Type the page store option tests
jtklein-agents Nov 22, 2026
74313e3
Type the page store citation, host, menu and small bridge-call tests …
jtklein-agents Nov 22, 2026
f281087
Rename the page store run computeds, options and input-action tests t…
jtklein-agents Nov 22, 2026
122c76f
Merge pull request #316 from jtklein-agents/305-convert-page-store-op…
jtklein-agents Nov 22, 2026
74c717f
Type the page store run computeds, options and input-action tests
jtklein-agents Nov 22, 2026
945239c
Merge pull request #317 from jtklein-agents/306-typed-page-store-smal…
jtklein-agents Nov 22, 2026
51e3889
Merge pull request #318 from jtklein-agents/303-page-store-run-tests-…
jtklein-agents Nov 22, 2026
d0d035d
Narrow the Vitest include to TypeScript tests
jtklein-agents Nov 22, 2026
bf1b927
Merge pull request #320 from jtklein-agents/307-close-the-vitest-spec…
jtklein-agents Nov 22, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {
root: true,
extends: ['react-app', 'react-app/jest'],
extends: ['react-app'],
ignorePatterns: ['build/', 'dist/', 'docs/', 'node_modules/'],
plugins: ['lodash'],
rules: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
const { parseModelTestLog } = require('./modeltestOutcome');
const { compareOutcome, formatReport } = require('./fixtures');
import { describe, expect, it } from 'vitest';

import { parseModelTestLog } from './modeltestOutcome';
import { compareOutcome, formatReport } from './fixtures';

const log = `--------------------------------------------------------------------------------
ModelTest-NG v0.1.7
Expand Down
6 changes: 4 additions & 2 deletions e2e/helpers/newick.test.js → e2e/helpers/newick.test.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
const {
import { describe, expect, it } from 'vitest';

import {
parseNewick,
getTaxa,
compareTopologies,
compareBranchLengths,
} = require('./newick');
} from './newick';

describe('newick helpers', () => {
it('parses branch lengths and lists taxa', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
const { parseRaxmlHpcOutput } = require('./raxmlHpcOutcome');
import { describe, expect, it } from 'vitest';

import { parseRaxmlHpcOutput } from './raxmlHpcOutcome';

const info = `

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
const { parseRaxmlNgOutput } = require('./raxmlNgOutcome');
import { describe, expect, it } from 'vitest';

import { parseRaxmlNgOutput } from './raxmlNgOutcome';

const log = `RAxML-NG v. 1.2.2 released on 30.04.2024 by The Exelixis Lab.

Expand Down
2 changes: 1 addition & 1 deletion e2e/playwright.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const path = require('path');
/** @type {import('playwright/test').PlaywrightTestConfig} */
const config = {
testDir: path.join(__dirname),
testMatch: '**/*.spec.js', // Jest owns *.test.js
testMatch: '**/*.spec.js', // Vitest owns *.test.ts and *.test.tsx
testIgnore: ['docs/**'],
// Locator checks use Playwright's 5s expect timeout. A long wait passes its own timeout.
timeout: 15 * 60 * 1000,
Expand Down
17 changes: 0 additions & 17 deletions jest.config.js

This file was deleted.

16 changes: 0 additions & 16 deletions jest/babelTransform.js

This file was deleted.

16 changes: 0 additions & 16 deletions jest/electron.js

This file was deleted.

1 change: 0 additions & 1 deletion jest/fileMock.js

This file was deleted.

3 changes: 0 additions & 3 deletions jest/sentry.js

This file was deleted.

70 changes: 0 additions & 70 deletions jest/setup.js

This file was deleted.

30 changes: 0 additions & 30 deletions jest/storeBridge.js

This file was deleted.

22 changes: 8 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
"main": "./out/main/index.js",
"scripts": {
"start": "electron-vite dev",
"test": "jest --watchAll=false",
"react-test": "jest --watchAll=false",
"test": "vitest run",
"react-test": "vitest run",
"test:e2e": "yarn build && node node_modules/playwright/cli.js test --config e2e/playwright.config.js",
"test:e2e:update-fixtures": "yarn build && node e2e/updateFixtures.js",
"test:docs": "node node_modules/playwright/cli.js test --config e2e/docs/playwright.config.js",
Expand All @@ -51,8 +51,8 @@
"docs-serve": "cd docs && bundle exec jekyll serve --config _config.yml,_config_dev.yml",
"typecheck": "tsc --noEmit",
"typecheck:baseline": "node scripts/typecheck-baseline.js",
"lint": "eslint \"src/**/*.{js,jsx,ts,tsx}\" electron.vite.config.js jest.config.js \"jest/**/*.js\" --max-warnings 0",
"lint:fix": "eslint \"src/**/*.{js,jsx,ts,tsx}\" electron.vite.config.js jest.config.js \"jest/**/*.js\" --fix"
"lint": "eslint \"src/**/*.{js,jsx,ts,tsx}\" electron.vite.config.js vitest.config.mjs --max-warnings 0",
"lint:fix": "eslint \"src/**/*.{js,jsx,ts,tsx}\" electron.vite.config.js vitest.config.mjs --fix"
},
"dependencies": {
"@emotion/react": "^11.14.0",
Expand Down Expand Up @@ -85,11 +85,6 @@
"yup": "^1.7.1"
},
"devDependencies": {
"@babel/plugin-proposal-class-properties": "^7.18.6",
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
"@babel/plugin-transform-react-jsx": "7.25.2",
"@babel/preset-env": "^7.29.7",
"@babel/preset-typescript": "^7.24.7",
"@electron/notarize": "^3.1.2",
"@sentry/bundler-plugins": "11.12.0",
"@sentry/cli": "^3.8.2",
Expand All @@ -102,7 +97,6 @@
"@typescript-eslint/eslint-plugin": "^8",
"@typescript-eslint/parser": "^8",
"@vitejs/plugin-react": "5.2.0",
"babel-jest": "27.5.1",
"dotenv": "^17.4.2",
"download": "^8.0.0",
"electron": "^45.2.3",
Expand All @@ -112,12 +106,13 @@
"eslint": "^8.57.0",
"eslint-config-react-app": "7.0.1",
"eslint-plugin-lodash": "^8.1.0",
"jest": "27.5.1",
"jsdom": "^29.1.1",
"npm-run-all": "^4.1.5",
"playwright": "^1.65.0",
"prettier": "^3.9.10",
"typescript": "^5.9.3",
"vite": "^8.3.7"
"vite": "^8.3.7",
"vitest": "^5.1.1"
},
"browserslist": [
">0.2%",
Expand All @@ -139,9 +134,9 @@
"!e2e{,/**/*}",
"!docs{,/**/*}",
"!electron.vite.config.js",
"!vitest.config.mjs",
"!static{,/**/*}",
"!scripts{,/**/*}",
"!jest{,/**/*}",
"!test-results{,/**/*}",
"!playwright-report{,/**/*}"
],
Expand Down Expand Up @@ -216,7 +211,6 @@
}
},
"resolutions": {
"@babel/plugin-proposal-private-property-in-object": "7.21.11",
"@typescript-eslint/eslint-plugin": "^8.72.1",
"@typescript-eslint/parser": "^8.72.1"
}
Expand Down
6 changes: 3 additions & 3 deletions scripts/typecheck-baseline.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ function fingerprint(line) {
return line.replace(/\(\d+,\d+\): /, ': ');
}

/** Pathless tsc continuations belong to the preceding src/ header. */
/** Pathless tsc continuations belong to the preceding file header. */
function ownedFingerprints(lines) {
let owner = '';
return lines.map((line) => {
const match = /^(src\/\S+?)\(/.exec(line);
const match = /^(\S+?)\(\d+,\d+\): /.exec(line);
if (match) {
owner = match[1];
return fingerprint(line);
Expand Down Expand Up @@ -70,7 +70,7 @@ function renameLines(known, actual, from, to) {
function typeScriptLines(lines) {
let inTypeScript = false;
return lines.filter((line) => {
const match = /^(src\/\S+?)\(/.exec(line);
const match = /^(\S+?)\(\d+,\d+\): /.exec(line);
if (match) {
inTypeScript = /\.tsx?$/.test(match[1]);
}
Expand Down
3 changes: 1 addition & 2 deletions src/app/App.test.js → src/app/App.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// @ts-nocheck — Jest globals. checkJs has no test runner types.
import { expect, it } from 'vitest';
import React, { act } from 'react';
import { createRoot } from 'react-dom/client';
import Page from './index';
Expand All @@ -7,7 +7,6 @@ it( 'renders without crashing', () => {
const div = document.createElement( 'div' );
const root = createRoot( div );
// createRoot().render paints on a later tick. act flushes that paint.
// eslint-disable-next-line testing-library/no-unnecessary-act
act( () => {
root.render( <Page /> );
} );
Expand Down
28 changes: 14 additions & 14 deletions src/app/bootstrap.test.js → src/app/bootstrap.test.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
// @ts-nocheck — Jest globals. checkJs has no test runner types.
import { expect, it, vi } from 'vitest';
import { installBridge } from '../test/setup';

function loadBootstrap( nodeEnv ) {
async function loadBootstrap( nodeEnv: string ) {
const previousEnv = process.env.NODE_ENV;
const previousE2E = process.env.RAXMLGUI_E2E;
process.env.NODE_ENV = nodeEnv;
delete process.env.RAXMLGUI_E2E;
let store;
try {
jest.isolateModules( () => {
store = require( './store' ).default;
require( './bootstrap' );
} );
vi.resetModules();
store = ( await import( './store' ) ).default;
await import( './bootstrap' );
} finally {
process.env.NODE_ENV = previousEnv;
if ( previousE2E === undefined ) {
Expand All @@ -23,18 +23,18 @@ function loadBootstrap( nodeEnv ) {
}

it( 'the dev bootstrap loads the example files', async () => {
const getExampleFiles = jest.fn( async () => ( {
const getExampleFiles = vi.fn( async () => ( {
fasta: ['nucleotide.txt'],
phylip: ['dna_sequential.txt'],
dir: '/examples',
outdir: '/out',
} ) );
window.rendererBridge = {
installBridge( {
getExampleFiles,
parseAlignment: () => new Promise( () => {} ),
};
} );

const store = loadBootstrap( 'development' );
const store = await loadBootstrap( 'development' );

expect( getExampleFiles ).toHaveBeenCalledTimes( 1 );
await getExampleFiles.mock.results[0].value;
Expand All @@ -44,11 +44,11 @@ it( 'the dev bootstrap loads the example files', async () => {
] );
} );

it( 'a production load does not ask for the example files', () => {
const getExampleFiles = jest.fn();
window.rendererBridge = { getExampleFiles };
it( 'a production load does not ask for the example files', async () => {
const getExampleFiles = vi.fn();
installBridge( { getExampleFiles } );

loadBootstrap( 'production' );
await loadBootstrap( 'production' );

expect( getExampleFiles ).not.toHaveBeenCalled();
} );
Loading
Loading