UNPKG

@kintone/dts-gen

Version:

Types for kintone js api and Types generating tools

33 lines 1.1 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const namespace_1 = require("./namespace"); const typedefinitions_1 = require("./typedefinitions"); describe("Namespace", () => { class TestTypeDefinition extends typedefinitions_1.TypeDefinition { constructor() { super(null, null, []); } tsExpression() { return "interface TestType {}"; } } class TestSavedTypeDefinition extends typedefinitions_1.SavedTypeDefinition { constructor() { super(null, [], []); } tsExpression() { return "interface SavedTestType extends TestType {}"; } } test("tsExpression()", () => { const typeName = "TestField"; expect(new namespace_1.Namespace("test.types", new TestTypeDefinition(), new TestSavedTypeDefinition()) .tsExpression() .trim()).toEqual(` declare namespace test.types { interface TestType {} interface SavedTestType extends TestType {} }`.trim()); }); }); //# sourceMappingURL=namespace.test.js.map