From ac4e1db33dc50de61028f95eff4afb73169d5f68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=B8=85?= Date: Thu, 4 Apr 2019 15:18:07 +0800 Subject: [PATCH] bugfix: fix test --- jest.config.js | 3 +++ src/utils/authority.test.js | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/jest.config.js b/jest.config.js index 68a1144b..a1d8c22c 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,4 +1,7 @@ module.exports = { testURL: 'http://localhost:8000', preset: 'jest-puppeteer', + globals: { + APP_TYPE: false, + }, }; diff --git a/src/utils/authority.test.js b/src/utils/authority.test.js index 8a6cd41f..15b3cb95 100644 --- a/src/utils/authority.test.js +++ b/src/utils/authority.test.js @@ -2,7 +2,7 @@ import { getAuthority } from './authority'; describe('getAuthority should be strong', () => { it('empty', () => { - expect(getAuthority(null)).toEqual(['admin']); // default value + expect(getAuthority(null)).toEqual(null); // default value }); it('string', () => { expect(getAuthority('admin')).toEqual(['admin']); -- GitLab