Closed noahmulfinger closed 7 years ago
@noahmulfinger in your test the transforms aren't being run, this test passes:
test.only("should set metadata of symlinked files", t => {
const acetate = new Acetate({
root: t.context.temp,
sourceDir: "loader-basic",
log: "silent",
config: false
});
acetate.load("**/*.+(md|html)");
acetate.symlink("create-page", "external");
acetate.metadata("external/**/*", {
title: "Template"
});
return acetate
.getPages()
.then(pages => {
return Promise.all(pages.map(p => acetate.transformPage(p)));
})
.then(transformedPages => {
const page = transformedPages.find(
page => page.src === "external/page.html"
);
t.is(page.src, "external/page.html");
t.is(page.title, "Template");
});
});
Could you double check the paths that you are passing to acetate.symlink()
? Maybe a path is wrong.
@patrickarlt You're right, the paths were wrong. I didn't realize that the src
argument was from the project root, but the dest
argument was from the src
directory. Closing.
Here is an example of a failing test (added a metadata command to the current symlink test):
These additional modifications to the test had no effect:
"create-page/**/*"
instead of"external/**/*"
.