Add extra template fetch test
Signed-off-by: Marcus Crane <marcus@utf9k.net>
This commit is contained in:
@@ -297,6 +297,9 @@ describe('fetch:template', () => {
|
||||
symlink: mockFs.symlink({
|
||||
path: 'a-binary-file.png',
|
||||
}),
|
||||
brokenSymlink: mockFs.symlink({
|
||||
path: './not-a-real-file.txt'
|
||||
})
|
||||
},
|
||||
});
|
||||
|
||||
@@ -371,6 +374,17 @@ describe('fetch:template', () => {
|
||||
fs.realpath(`${workspacePath}/target/symlink`),
|
||||
).resolves.toBe(joinPath(workspacePath, 'target', 'a-binary-file.png'));
|
||||
});
|
||||
it('copies broken symlinks as-is without processing them', async () => {
|
||||
await expect(
|
||||
fs
|
||||
.lstat(`${workspacePath}/target/brokenSymlink`)
|
||||
.then(i => i.isSymbolicLink()),
|
||||
).resolves.toBe(true);
|
||||
|
||||
await expect(
|
||||
fs.readlink(`${workspacePath}/target/brokenSymlink`)
|
||||
).resolves.toEqual('./not-a-real-file.txt');
|
||||
})
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user