diff --git a/lib/util/fs/index.spec.ts b/lib/util/fs/index.spec.ts
index 31c2dc4ecfe503bfa7546b76e594c63c153cc1f6..1829545a736ca4a424891858b62b89a157f57901 100644
--- a/lib/util/fs/index.spec.ts
+++ b/lib/util/fs/index.spec.ts
@@ -243,36 +243,41 @@ describe('util/fs/index', () => {
     });
   });
 
-  describe('chmodLocalFile', () => {
+  describe('statLocalFile', () => {
     it('works', async () => {
       await withDir(
         async (tmpDir) => {
           GlobalConfig.set({ localDir: tmpDir.path });
+
+          expect(await statLocalFile('foo')).toBeNull();
+
           await writeLocalFile('foo', 'bar');
-          await chmodLocalFile('foo', 0o000);
-          expect(await readLocalFile('foo')).toBeNull();
-          await chmodLocalFile('foo', 0o444);
-          expect((await readLocalFile('foo'))!.toString()).toBe('bar');
+          const stat = await statLocalFile('foo');
+          expect(stat).toBeDefined();
+          expect(stat!.isFile()).toBeTrue();
         },
         { unsafeCleanup: true }
       );
     });
   });
 
-  describe('statLocalFile', () => {
+  describe('chmodLocalFile', () => {
     it('works', async () => {
       await withDir(
         async (tmpDir) => {
           GlobalConfig.set({ localDir: tmpDir.path });
-
-          expect(await statLocalFile('foo')).toBeNull();
-
           await writeLocalFile('foo', 'bar');
-          await chmodLocalFile('foo', 0o123);
+          let stat = await statLocalFile('foo');
+          const oldMode = stat!.mode & 0o777;
+          const newMode = oldMode & 0o555; // Remove `write` attributes (Windows-compatible)
+
+          await chmodLocalFile('foo', newMode);
+          stat = await statLocalFile('foo');
+          expect(stat!.mode & 0o777).toBe(newMode);
 
-          const res = await statLocalFile('foo');
-          expect(res!.isFile()).toBeTrue();
-          expect(res!.mode & 0o777).toBe(0o123);
+          await chmodLocalFile('foo', oldMode);
+          stat = await statLocalFile('foo');
+          expect(stat!.mode & 0o777).toBe(oldMode);
         },
         { unsafeCleanup: true }
       );