You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
WebCAD/__test__/FileSystem/Purge.test.ts

26 lines
676 B

import { Purge } from "../../src/Add-on/Purge";
import { CADFiler } from "../../src/DatabaseServices/CADFiler";
import { Database } from "../../src/DatabaseServices/Database";
import { LoadEntityFromFileData } from "../Utils/LoadEntity.util";
LoadEntityFromFileData;
test('PU', () =>
{
let d = require("./pu_test.json");
let f = new CADFiler(d);
let db = new Database();
db.FileRead(f);
expect(db.ModelSpace.Entitys.length).toMatchSnapshot();
expect(db.TemplateTable.Objects.length).toMatchSnapshot();
Purge(db);
expect(db.ModelSpace.Entitys.length).toMatchSnapshot();
expect(db.TemplateTable.Objects.length).toMatchSnapshot();
});