style(16): apply prettier formatting to satisfy CI format:check
CI / changes (pull_request) Successful in 2s
CI / fast-checks (pull_request) Successful in 1m23s
CI / api (pull_request) Successful in 1m0s
CI / harness (pull_request) Successful in 3m54s
CI / security (pull_request) Successful in 40s
CI / gate (pull_request) Successful in 1s
CI / changes (pull_request) Successful in 2s
CI / fast-checks (pull_request) Successful in 1m23s
CI / api (pull_request) Successful in 1m0s
CI / harness (pull_request) Successful in 3m54s
CI / security (pull_request) Successful in 40s
CI / gate (pull_request) Successful in 1s
This commit is contained in:
@@ -28,11 +28,9 @@ describe('assertNotDevBypassInProduction', () => {
|
||||
process.env.NODE_ENV = 'production';
|
||||
process.env.DEV_AUTH_BYPASS = 'true';
|
||||
|
||||
const exitSpy = vi
|
||||
.spyOn(process, 'exit')
|
||||
.mockImplementation((() => {
|
||||
throw new Error('process.exit called');
|
||||
}) as never);
|
||||
const exitSpy = vi.spyOn(process, 'exit').mockImplementation((() => {
|
||||
throw new Error('process.exit called');
|
||||
}) as never);
|
||||
|
||||
expect(() => assertNotDevBypassInProduction()).toThrow('process.exit called');
|
||||
expect(exitSpy).toHaveBeenCalledWith(1);
|
||||
@@ -44,11 +42,9 @@ describe('assertNotDevBypassInProduction', () => {
|
||||
process.env.NODE_ENV = 'development';
|
||||
process.env.DEV_AUTH_BYPASS = 'true';
|
||||
|
||||
const exitSpy = vi
|
||||
.spyOn(process, 'exit')
|
||||
.mockImplementation((() => {
|
||||
throw new Error('process.exit called');
|
||||
}) as never);
|
||||
const exitSpy = vi.spyOn(process, 'exit').mockImplementation((() => {
|
||||
throw new Error('process.exit called');
|
||||
}) as never);
|
||||
|
||||
expect(() => assertNotDevBypassInProduction()).not.toThrow();
|
||||
expect(exitSpy).not.toHaveBeenCalled();
|
||||
@@ -60,11 +56,9 @@ describe('assertNotDevBypassInProduction', () => {
|
||||
process.env.NODE_ENV = 'production';
|
||||
delete process.env.DEV_AUTH_BYPASS;
|
||||
|
||||
const exitSpy = vi
|
||||
.spyOn(process, 'exit')
|
||||
.mockImplementation((() => {
|
||||
throw new Error('process.exit called');
|
||||
}) as never);
|
||||
const exitSpy = vi.spyOn(process, 'exit').mockImplementation((() => {
|
||||
throw new Error('process.exit called');
|
||||
}) as never);
|
||||
|
||||
expect(() => assertNotDevBypassInProduction()).not.toThrow();
|
||||
expect(exitSpy).not.toHaveBeenCalled();
|
||||
|
||||
Reference in New Issue
Block a user