Git Komut Rehberi & Terminal Asistanı
Sıfırdan Yeni Bir Depo Başlatın:
Mevcut Bir Git Deposu veya Klasörü Gönderin:
Hataları Geri Alma, İptal & Temizlik:
Son commit'i geri al (yapılan değişiklikleri korur):
git reset --soft HEAD~1
Yapılan yerel değişiklikleri iptal et (çalışma ağacını temizler):
git restore .
Takip edilmeyen gereksiz dosyaları sil:
git clean -fd
Değişiklikleri geçici sakla ve geri getir (stash):
git stash git stash pop
Dal (Branch) ve Sürüm Etiketleri:
Yeni dal aç ve geçiş yap:
git checkout -b yeni-ozellik git push -u origin yeni-ozellik
Sürüm etiketi (tag) oluştur ve gönder:
git tag -a v1.0.0 -m "Sürüm 1.0.0" git push origin --tags
feat: improve shape tools and project previews
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import {
|
||||
projectThumbnailDimensions,
|
||||
projectThumbnailSceneChanged,
|
||||
} from "@/lib/projectThumbnail";
|
||||
|
||||
describe("project thumbnails", () => {
|
||||
it("reduces a high-DPI editor canvas to the thumbnail bounds", () => {
|
||||
expect(projectThumbnailDimensions(2048, 992)).toEqual({ width: 512, height: 248 });
|
||||
expect(projectThumbnailDimensions(800, 1200)).toEqual({ width: 213, height: 320 });
|
||||
expect(projectThumbnailDimensions(320, 180)).toEqual({ width: 320, height: 180 });
|
||||
});
|
||||
|
||||
it("captures only changed scenes within the same project", () => {
|
||||
const original = { projectId: "project-1", fingerprint: "scene-a" };
|
||||
expect(projectThumbnailSceneChanged(null, original)).toBe(false);
|
||||
expect(projectThumbnailSceneChanged(original, original)).toBe(false);
|
||||
expect(projectThumbnailSceneChanged(original, { ...original, fingerprint: "scene-b" })).toBe(true);
|
||||
expect(projectThumbnailSceneChanged(original, { projectId: "project-2", fingerprint: "scene-b" })).toBe(false);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user