mirror of
https://github.com/stefanpejcic/openpanel
synced 2025-06-26 18:28:26 +00:00
24 lines
511 B
TypeScript
24 lines
511 B
TypeScript
import { appendAfterImports } from "./appendAfterImports";
|
|
|
|
describe("appendAfterImports", () => {
|
|
it("should append after imports", () => {
|
|
const content = `
|
|
import { foo } from "bar";
|
|
import { bar } from "foo";
|
|
import { baz } from "baz";
|
|
`;
|
|
|
|
const append = `console.log("hello world");`;
|
|
|
|
const result = appendAfterImports(content, append);
|
|
|
|
expect(result).toEqual(`
|
|
import { foo } from "bar";
|
|
import { bar } from "foo";
|
|
import { baz } from "baz";
|
|
console.log("hello world");
|
|
|
|
`);
|
|
});
|
|
});
|