mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-10 07:25:44 +01:00
apply prettier, removed flow related config and added tsconfig
This commit is contained in:
@@ -1,28 +1,28 @@
|
||||
import { createLink } from './FileTreeLeaf';
|
||||
import { File } from '@scm-manager/ui-types';
|
||||
import { createLink } from "./FileTreeLeaf";
|
||||
import { File } from "@scm-manager/ui-types";
|
||||
|
||||
describe('create link tests', () => {
|
||||
describe("create link tests", () => {
|
||||
function dir(path: string): File {
|
||||
return {
|
||||
name: 'dir',
|
||||
name: "dir",
|
||||
path: path,
|
||||
directory: true,
|
||||
length: 1,
|
||||
revision: '1a',
|
||||
revision: "1a",
|
||||
_links: {},
|
||||
_embedded: {
|
||||
children: [],
|
||||
},
|
||||
children: []
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
it('should create link', () => {
|
||||
expect(createLink('src', dir('main'))).toBe('src/main/');
|
||||
expect(createLink('src', dir('/main'))).toBe('src/main/');
|
||||
expect(createLink('src', dir('/main/'))).toBe('src/main/');
|
||||
it("should create link", () => {
|
||||
expect(createLink("src", dir("main"))).toBe("src/main/");
|
||||
expect(createLink("src", dir("/main"))).toBe("src/main/");
|
||||
expect(createLink("src", dir("/main/"))).toBe("src/main/");
|
||||
});
|
||||
|
||||
it('should return base url if the directory path is empty', () => {
|
||||
expect(createLink('src', dir(''))).toBe('src/');
|
||||
it("should return base url if the directory path is empty", () => {
|
||||
expect(createLink("src", dir(""))).toBe("src/");
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user