hongbo-miao/hongbomiao.com

View on GitHub
api-node/src/shared/utils/isProduction.test.ts

Summary

Maintainability
A
0 mins
Test Coverage
import NodeEnv from './NodeEnv';
import isProduction from './isProduction';

describe('isProduction', () => {
  test('return true for production', () => {
    expect(isProduction(NodeEnv.production)).toEqual(true);
  });

  test('return false for development', () => {
    expect(isProduction(NodeEnv.development)).toEqual(false);
  });

  test('return false for test', () => {
    expect(isProduction(NodeEnv.test)).toEqual(false);
  });
});