Skip to content

Commit

Permalink
add test for ApplicationFormatter#getSourceBasePath
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiasso85 committed Mar 17, 2020
1 parent d7c7ebf commit 7b8fc99
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/lib/types/application/ApplicationFormatter.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,15 @@ function createMockProject() {
};
}

test("getSourceBasePath: posix", async (t) => {
const myProject = clone(applicationBTree);
myProject.path = "my/pony";
const applicationFormatter = new ApplicationFormatter({project: myProject});

const sourceBasePath = applicationFormatter.getSourceBasePath(true);
t.is(sourceBasePath, "my/pony/webapp", "correct path");
});

test("format: No 'sap.app' configuration found", async (t) => {
const project = createMockProject();
const applicationFormatter = new ApplicationFormatter({project});
Expand Down

0 comments on commit 7b8fc99

Please sign in to comment.