Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/ts_morph/basic_test.ts

TypeScript Compiler API wrapper for static analysis and programmatic code changes.
Very Popular
Latest
File
import { assertEquals } from "https://deno.land/std@0.208.0/testing/asserts.ts";import { Project } from "./mod.ts";
// todo: Eventually all tests run for the node package should also be run for DenoDeno.test("ts-morph basic tests", () => { const project = new Project({ useInMemoryFileSystem: true }); const sourceFile = project.createSourceFile("test.ts", "class T {\n}"); sourceFile.addClass({ name: "Other", }); assertEquals(sourceFile.getText(), `class T {\n}\n\nclass Other {\n}\n`);});