mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-23 14:15:13 +00:00
fix: relax lock settings (#5280)
This commit is contained in:
parent
2eb1965357
commit
65a431d68c
@ -8,8 +8,8 @@ import onExit from 'signal-exit'
|
||||
export const lockPaths = new Set()
|
||||
|
||||
export const defaultLockOptions = {
|
||||
stale: 15000,
|
||||
onCompromised: err => consola.fatal(err)
|
||||
stale: 30000,
|
||||
onCompromised: err => consola.warn(err)
|
||||
}
|
||||
|
||||
export function getLockOptions(options) {
|
||||
|
@ -18,9 +18,9 @@ describe('util: locking', () => {
|
||||
beforeEach(() => jest.resetAllMocks())
|
||||
beforeEach(() => lockPaths.clear())
|
||||
|
||||
test('onCompromised lock is fatal error by default', () => {
|
||||
test('onCompromised lock is warn error by default', () => {
|
||||
defaultLockOptions.onCompromised()
|
||||
expect(consola.fatal).toHaveBeenCalledTimes(1)
|
||||
expect(consola.warn).toHaveBeenCalledTimes(1)
|
||||
})
|
||||
|
||||
test('can override default options', () => {
|
||||
|
Loading…
Reference in New Issue
Block a user