Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: replace Jest with Vitest #317

Merged
merged 9 commits into from
Jan 20, 2025
Merged
Changes from 1 commit
Commits
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
Prev Previous commit
update deps
targos committed Jan 20, 2025
commit e705f83773998eb511fd1f3912f0df386b1b35df
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -62,7 +62,7 @@
"robust-point-in-polygon": "^1.0.3",
"ssim.js": "^3.5.0",
"tiff": "^6.1.1",
"ts-pattern": "^5.6.0"
"ts-pattern": "^5.6.1"
},
"devDependencies": {
"@microsoft/api-extractor": "^7.49.1",
@@ -89,11 +89,11 @@
"prettier": "^3.4.2",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"react-router-dom": "^7.1.1",
"react-router-dom": "^7.1.3",
"rimraf": "^6.0.1",
"tailwindcss": "^3.4.17",
"typescript": "~5.7.3",
"vite": "^6.0.7",
"vite": "^6.0.8",
"vitest": "^2.1.8"
}
}

Unchanged files with check annotations Beta

import Filters from './Filters.js';
import Home from './Home.js';
export default function App() {

Check warning on line 8 in demo/components/App.tsx

GitHub Actions / nodejs / lint-eslint

Missing JSDoc comment
return (
<CameraProvider>
<HashRouter>
import UnavailableCamera from './UnavailableCamera.js';
export default function CameraFeed() {

Check warning on line 7 in demo/components/CameraFeed.tsx

GitHub Actions / nodejs / lint-eslint

Missing JSDoc comment
const [{ selectedCamera }] = useCameraContext();
const videoRef = useRef<HTMLVideoElement>(null);
useEffect(() => {
import { useCameraContext } from '../contexts/cameraContext.js';
export default function CameraSelector() {

Check warning on line 3 in demo/components/CameraSelector.tsx

GitHub Actions / nodejs / lint-eslint

Missing JSDoc comment
const [{ cameras, selectedCamera }, dispatch] = useCameraContext();
if (cameras.length === 0) return null;
return (
canvasInputRef: RefObject<HTMLCanvasElement | null>;
}
export default function CameraSnapshotButton(props: CameraSnapshotButtonProps) {

Check warning on line 12 in demo/components/CameraSnapshotButton.tsx

GitHub Actions / nodejs / lint-eslint

Missing JSDoc comment
const { setSnapshotUrl, snapshotImageRef, canvasInputRef } = props;
function handleClick() {
if (canvasInputRef.current) {
snapshotImageRef: RefObject<Image | null>;
}
export default function CameraTransform(props: CameraTransformProps) {

Check warning on line 24 in demo/components/CameraTransform.tsx

GitHub Actions / nodejs / lint-eslint

Missing JSDoc comment
const { canvasInputRef, transform, snapshotUrl, snapshotImageRef } = props;
const [{ selectedCamera }] = useCameraContext();
const videoRef = useRef<HTMLVideoElement>(null);
title: string;
children: ReactNode;
}
export default function Container(props: ContainerProps) {

Check warning on line 9 in demo/components/Container.tsx

GitHub Actions / nodejs / lint-eslint

Missing JSDoc comment
return (
<div>
<Navbar />
import type { ReactNode } from 'react';
export default function ErrorAlert(props: { children: ReactNode }) {

Check warning on line 3 in demo/components/ErrorAlert.tsx

GitHub Actions / nodejs / lint-eslint

Missing JSDoc comment
return (
<div className="p-4 text-red-800 bg-red-200 rounded">{props.children}</div>
);
import Container from './Container.js';
export default function Filters() {

Check warning on line 3 in demo/components/Filters.tsx

GitHub Actions / nodejs / lint-eslint

Missing JSDoc comment
return <Container title="Filters">Filters</Container>;
}
const testTransform: TransformFunction = testGetFastKeypoints;
export default function Home() {

Check warning on line 14 in demo/components/Home.tsx

GitHub Actions / nodejs / lint-eslint

Missing JSDoc comment
const snapshotImageRef = useRef<Image>(null);
const canvasInputRef = useRef<HTMLCanvasElement>(null);
const [snapshotUrl, setSnapshotUrl] = useState('');
{ name: 'Filters', href: '/filters', current: false },
];
export default function Navbar() {

Check warning on line 9 in demo/components/Navbar.tsx

GitHub Actions / nodejs / lint-eslint

Missing JSDoc comment
const location = useLocation();
const currentNavigation = navigation.map((navItem) => ({
...navItem,