Explorar o código

bugfix: fix test

陈帅 %!s(int64=6) %!d(string=hai) anos
pai
achega
ac4e1db33d
Modificáronse 2 ficheiros con 4 adicións e 1 borrados
  1. 3 0
      jest.config.js
  2. 1 1
      src/utils/authority.test.js

+ 3 - 0
jest.config.js

@@ -1,4 +1,7 @@
 module.exports = {
   testURL: 'http://localhost:8000',
   preset: 'jest-puppeteer',
+  globals: {
+    APP_TYPE: false,
+  },
 };

+ 1 - 1
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']);