diff --git a/lib/lockfile.js b/lib/lockfile.js index 2078e82..3cd769b 100644 --- a/lib/lockfile.js +++ b/lib/lockfile.js @@ -51,7 +51,7 @@ function acquireLock(file, options, callback) { } if (!isLockStale(stat, options)) { - return callback(Object.assign(new Error('Lock file is already being hold'), { code: 'ELOCKED', file })); + return callback(Object.assign(new Error('Lock file is already being held'), { code: 'ELOCKED', file })); } // If it's stale, remove it and try again! diff --git a/test/sync.test.js b/test/sync.test.js index 7a3afd2..53d7b2c 100644 --- a/test/sync.test.js +++ b/test/sync.test.js @@ -37,7 +37,7 @@ describe('.lockSync()', () => { lockfile.lockSync(`${tmpDir}/foo`); expect(fs.existsSync(`${tmpDir}/foo.lock`)).toBe(true); - expect(() => lockfile.lockSync(`${tmpDir}/foo`)).toThrow(/already being hold/); + expect(() => lockfile.lockSync(`${tmpDir}/foo`)).toThrow(/already being held/); }); it('should pass options correctly', () => {