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
Checkpoint SKF project format and export updates
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { toSvgProjection } from "@/lib/svgExport";
|
||||
|
||||
describe("SVG projection export", () => {
|
||||
it("writes an SVG 1.1 document with millimeter dimensions and even-odd contours", () => {
|
||||
const svg = toSvgProjection([
|
||||
{
|
||||
name: "Plate & ring",
|
||||
color: "#d41721",
|
||||
polygons: [
|
||||
[[-5, -3], [5, -3], [5, 3], [-5, 3]],
|
||||
[[-2, -1], [-2, 1], [2, 1], [2, -1]],
|
||||
],
|
||||
},
|
||||
], "Fixture <top>");
|
||||
|
||||
expect(svg).toContain('version="1.1"');
|
||||
expect(svg).toContain('width="10mm" height="6mm" viewBox="-5 -3 10 6"');
|
||||
expect(svg).toContain('fill-rule="evenodd"');
|
||||
expect(svg).toContain('data-name="Plate & ring"');
|
||||
expect(svg).toContain("<title>Fixture <top></title>");
|
||||
expect(svg.match(/M/g)).toHaveLength(2);
|
||||
});
|
||||
|
||||
it("rejects empty and zero-area projections", () => {
|
||||
expect(() => toSvgProjection([])).toThrow(/no readable contours/i);
|
||||
expect(() => toSvgProjection([{ name: "Line", color: "bad", polygons: [[[0, 0], [1, 0], [2, 0]]] }])).toThrow(/visible area/i);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user