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
32 lines
1.3 KiB
TypeScript
32 lines
1.3 KiB
TypeScript
import { describe, expect, it } from "vitest";
|
|||
|
|
import { interiorWorkplaneGridCoordinates, workplaneGridPalette, WORKPLANE_LINE_ELEVATION } from "@/lib/workplaneGrid";
|
||
|
|
|
||
|
|
describe("workplane grid geometry", () => {
|
||
|
|
it("excludes both perimeter coordinates when spacing divides the workplane", () => {
|
||
|
|
const coordinates = interiorWorkplaneGridCoordinates(200, 5).map(({ coordinate }) => coordinate);
|
||
|
|
|
||
|
|
expect(coordinates).not.toContain(-100);
|
||
|
|
expect(coordinates).not.toContain(100);
|
||
|
|
expect(coordinates).toContain(0);
|
||
|
|
expect(coordinates.at(0)).toBe(-95);
|
||
|
|
expect(coordinates.at(-1)).toBe(95);
|
||
|
|
});
|
||
|
|
|
||
|
|
it("keeps the final interior line for custom spacing", () => {
|
||
|
|
const coordinates = interiorWorkplaneGridCoordinates(200, 30).map(({ coordinate }) => coordinate);
|
||
|
|
|
||
|
|
expect(coordinates).toEqual([-70, -40, -10, 20, 50, 80]);
|
||
|
|
});
|
||
|
|
|
||
|
|
it("uses one elevation for grid and border lines", () => {
|
||
|
|
expect(WORKPLANE_LINE_ELEVATION).toBe(0);
|
||
|
|
});
|
||
|
|
|
||
|
|
it("preserves the minor, major, and axis line hierarchy", () => {
|
||
|
|
const palette = workplaneGridPalette();
|
||
|
|
|
||
|
|
expect(palette.minor.opacity).toBeLessThan(palette.major.opacity);
|
||
|
|
expect(palette.major.opacity).toBeLessThan(palette.axis.opacity);
|
||
|
|
expect(palette.minor.color).not.toBe(palette.major.color);
|
||
|
|
});
|
||
|
|
});
|