Skip to content

Commit 15ecf13

Browse files
committed
add additional test for bad symlink fixture
1 parent 2f143ee commit 15ecf13

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/api-spec.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,13 @@ describe('api', function () {
153153
asar.extractAll('test/input/bad-symlink.asar', 'tmp/bad-symlink/');
154154
});
155155
});
156+
it('should throw when packaging symlink outside package', async function () {
157+
const src = 'test/input/packthis-with-bad-symlink/';
158+
const out = 'tmp/packthis-read-stream-bad-symlink.asar';
159+
assert.rejects(async () => {
160+
await asar.createPackage(src, out);
161+
});
162+
});
156163
}
157164
it('should handle multibyte characters in paths', async () => {
158165
await asar.createPackageWithOptions(

0 commit comments

Comments
 (0)