Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,29 @@ Object {
],
}
`;

exports[`denormalize works with directories starting with a dot 1`] = `
Object {
"directories": Array [
Object {
"directoryShortid": undefined,
"shortid": "0",
"title": ".github",
},
Object {
"directoryShortid": "0",
"shortid": "1",
"title": "workflows",
},
],
"modules": Array [
Object {
"code": "test",
"directoryShortid": "1",
"isBinary": false,
"shortid": "2",
"title": "test.yml",
},
],
}
`;
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,17 @@ describe("denormalize", () => {
expect(denormalized.directories).toEqual([]);
});

it("works with directories starting with a dot", () => {
const paths = {
".github/workflows/test.yml": { content: "test", isBinary: false },
};

const denormalized = denormalize(paths, []);

expect(denormalized).toMatchSnapshot();
expect(denormalized.directories.length).toBe(2);
});

it("can create nested directories", () => {
const paramFiles = {
"/src/test/new-file.js": { isBinary: false, content: "" },
Expand Down