;
}
document.body.style.backgroundColor = 'paleturquoise';
diff --git a/bin-src/register.js b/bin-src/register.js
index 9808929b0..6bdfc0442 100755
--- a/bin-src/register.js
+++ b/bin-src/register.js
@@ -1,5 +1,5 @@
#!/usr/bin/env node
-/* eslint-disable global-require */
+/* eslint-disable @typescript-eslint/no-var-requires */
require('dotenv').config();
diff --git a/bin-src/trace.test.ts b/bin-src/trace.test.ts
index 5662ca45b..4176abc71 100644
--- a/bin-src/trace.test.ts
+++ b/bin-src/trace.test.ts
@@ -1,4 +1,5 @@
import { execSync } from 'child_process';
+import { describe, expect, it } from 'vitest';
import {
rootDirNote,
diff --git a/bin-src/trim-stats-file.test.ts b/bin-src/trim-stats-file.test.ts
index 52d5e167e..073fc1f1a 100644
--- a/bin-src/trim-stats-file.test.ts
+++ b/bin-src/trim-stats-file.test.ts
@@ -1,7 +1,7 @@
import mockfs from 'mock-fs';
+import { afterEach, describe, expect, it } from 'vitest';
import { readStatsFile } from '../node-src/tasks/read-stats-file';
-// eslint-disable-next-line jest/no-mocks-import
import * as trimmedFile from './__mocks__/previewStatsJson/preview-stats.trimmed.json';
mockfs({
diff --git a/bin-src/trim-stats-file.ts b/bin-src/trim-stats-file.ts
index 9b093b3cb..7798cb405 100644
--- a/bin-src/trim-stats-file.ts
+++ b/bin-src/trim-stats-file.ts
@@ -1,4 +1,3 @@
-/* eslint-disable no-console */
import { outputFile } from 'fs-extra';
import { readStatsFile } from '../node-src/tasks/read-stats-file';
diff --git a/isChromatic.test.js b/isChromatic.test.ts
similarity index 82%
rename from isChromatic.test.js
rename to isChromatic.test.ts
index e636ef35f..bfdfb4f34 100644
--- a/isChromatic.test.js
+++ b/isChromatic.test.ts
@@ -1,6 +1,7 @@
/* eslint-env browser */
+import { describe, expect, it } from 'vitest';
-const isChromatic = require('./isChromatic');
+import isChromatic from './isChromatic';
describe('with window arg', () => {
it('returns false', () => {
@@ -10,7 +11,7 @@ describe('with window arg', () => {
userAgent: 'Chrome',
},
location: new URL('https://example.com'),
- })
+ } as any as Window)
).toBe(false);
});
@@ -21,7 +22,7 @@ describe('with window arg', () => {
userAgent: 'Chrome',
},
location: new URL('https://example.com?chromatic=true'),
- })
+ } as any as Window)
).toBe(true);
});
@@ -32,7 +33,7 @@ describe('with window arg', () => {
userAgent: 'Chromium(Chromatic)',
},
location: new URL('https://example.com'),
- })
+ } as any as Window)
).toBe(true);
});
});
diff --git a/jest.config.js b/jest.config.js
deleted file mode 100644
index 51e6ceffd..000000000
--- a/jest.config.js
+++ /dev/null
@@ -1,6 +0,0 @@
-module.exports = {
- transform: {
- '\\.[jt]sx?$': ['esbuild-jest'],
- },
- transformIgnorePatterns: ['node_modules/(?!(axios)/)'],
-};
diff --git a/node-src/git/findAncestorBuildWithCommit.test.ts b/node-src/git/findAncestorBuildWithCommit.test.ts
index 7d5960b00..f5ee862de 100644
--- a/node-src/git/findAncestorBuildWithCommit.test.ts
+++ b/node-src/git/findAncestorBuildWithCommit.test.ts
@@ -1,9 +1,11 @@
+import { beforeEach, describe, expect, it, vi } from 'vitest';
+
import {
AncestorBuildsQueryResult,
findAncestorBuildWithCommit,
} from './findAncestorBuildWithCommit';
-jest.mock('./git', () => ({
+vi.mock('./git', () => ({
commitExists: (hash) => hash.match(/exists/),
}));
@@ -19,7 +21,7 @@ const makeResult = (ancestorBuilds: Build[]): AncestorBuildsQueryResult => ({
});
describe('findAncestorBuildWithCommit', () => {
- const client = { runQuery: jest.fn() } as any;
+ const client = { runQuery: vi.fn() } as any;
beforeEach(() => {
client.runQuery.mockReset();
});
diff --git a/node-src/git/findAncestorBuildWithCommit.ts b/node-src/git/findAncestorBuildWithCommit.ts
index 9d8341267..c837af3a8 100644
--- a/node-src/git/findAncestorBuildWithCommit.ts
+++ b/node-src/git/findAncestorBuildWithCommit.ts
@@ -54,21 +54,19 @@ export async function findAncestorBuildWithCommit(
): Promise