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
46 lines
1.8 KiB
TypeScript
46 lines
1.8 KiB
TypeScript
import { describe, expect, it } from "vitest";
|
|||
|
|
import { SNAPCAD_PREFABS } from "@/lib/snapcadPrefabs";
|
||
|
|
|
||
|
|
describe("SnapCAD Prefabs Catalog", () => {
|
||
|
|
it("contains high-demand mechanical, maker, everyday, and architectural prefabs", () => {
|
||
|
|
expect(SNAPCAD_PREFABS.length).toBeGreaterThanOrEqual(14);
|
||
|
|
|
||
|
|
const ids = SNAPCAD_PREFABS.map((p) => p.id);
|
||
|
|
expect(ids).toContain("hex-nut-m8");
|
||
|
|
expect(ids).toContain("bearing-608zz");
|
||
|
|
expect(ids).toContain("hex-bolt-m8x35");
|
||
|
|
expect(ids).toContain("electronics-box");
|
||
|
|
expect(ids).toContain("arduino-uno-mount");
|
||
|
|
expect(ids).toContain("nema17-stepper-mount");
|
||
|
|
expect(ids).toContain("modular-arch-wall");
|
||
|
|
expect(ids).toContain("spiral-stairs");
|
||
|
|
expect(ids).toContain("truss-beam");
|
||
|
|
expect(ids).toContain("domino-run-track");
|
||
|
|
expect(ids).toContain("modern-terrace-villa");
|
||
|
|
expect(ids).toContain("retro-arcade-console");
|
||
|
|
expect(ids).toContain("cable-stayed-bridge");
|
||
|
|
expect(ids).toContain("iot-smart-hub-case");
|
||
|
|
});
|
||
|
|
|
||
|
|
it("builds valid non-empty shape lists for every prefab", () => {
|
||
|
|
for (const prefab of SNAPCAD_PREFABS) {
|
||
|
|
expect(prefab.id).toBeTruthy();
|
||
|
|
expect(prefab.title).toBeTruthy();
|
||
|
|
expect(prefab.category).toMatch(/^(mechanical|maker|everyday|architecture)$/);
|
||
|
|
expect(prefab.categoryLabel).toBeTruthy();
|
||
|
|
expect(prefab.description).toBeTruthy();
|
||
|
|
|
||
|
|
const shapes = prefab.buildShapes();
|
||
|
|
expect(shapes.length).toBeGreaterThan(0);
|
||
|
|
|
||
|
|
for (const shape of shapes) {
|
||
|
|
expect(shape.id).toBeTruthy();
|
||
|
|
expect(shape.name).toBeTruthy();
|
||
|
|
expect(shape.kind).toBeTruthy();
|
||
|
|
expect(typeof shape.width).toBe("number");
|
||
|
|
expect(typeof shape.height).toBe("number");
|
||
|
|
expect(typeof shape.depth).toBe("number");
|
||
|
|
}
|
||
|
|
}
|
||
|
|
});
|
||
|
|
});
|