Skip to content

Commit 8728a45

Browse files
committed
vfs: improve test coverage and add c8 ignore for SEA paths
Add comprehensive tests for URL arguments, throwIfNoEntry branches, VirtualDir async methods, VirtualWriteStream error paths, Provider base class, MemoryProvider edge cases, and VFS callback operations. Add c8 ignore comments for SEA provider and SEA VFS initialization code that requires actual SEA binary execution to test.
1 parent b894e3f commit 8728a45

4 files changed

Lines changed: 1209 additions & 0 deletions

File tree

lib/internal/vfs/providers/sea.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ const kAssets = Symbol('kAssets');
4444
const kDirectories = Symbol('kDirectories');
4545
const kGetAsset = Symbol('kGetAsset');
4646

47+
/* c8 ignore start -- SEA provider requires actual SEA binary execution */
4748
/**
4849
* File handle for SEA assets (read-only).
4950
*/
@@ -436,6 +437,8 @@ class SEAProvider extends VirtualProvider {
436437
}
437438
}
438439

440+
/* c8 ignore stop */
441+
439442
module.exports = {
440443
SEAProvider,
441444
};

lib/internal/vfs/sea.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ const lazySEAProvider = getLazy(
2020
() => require('internal/vfs/providers/sea').SEAProvider,
2121
);
2222

23+
/* c8 ignore start -- SEA VFS initialization requires actual SEA binary execution */
2324
/**
2425
* Creates a VirtualFileSystem populated with SEA assets using the Provider architecture.
2526
* Assets are mounted at the specified prefix (default: '/sea').
@@ -87,6 +88,8 @@ function getSeaVfs() {
8788
return cachedSeaVfs;
8889
}
8990

91+
/* c8 ignore stop */
92+
9093
module.exports = {
9194
createSeaVfs,
9295
initSeaVfs,

0 commit comments

Comments
 (0)