1
1
mirror of https://github.com/leon-ai/leon.git synced 2024-12-11 09:12:40 +03:00

test(server): fix removed require.requireActual() to jest.requireActual

This commit is contained in:
louistiti 2021-03-04 20:17:16 +08:00
parent 340054d8a7
commit 636602750a
No known key found for this signature in database
GPG Key ID: 7ECA3DD523793FE6

View File

@ -11,7 +11,7 @@ describe('OS helper', () => {
test('returns information for Windows', () => {
jest.unmock('os')
const o = require.requireActual('os')
const o = jest.requireActual('os')
o.type = jest.fn(() => 'Windows_NT')
expect(os.get()).toEqual({ name: 'Windows', type: 'windows' })
@ -19,7 +19,7 @@ describe('OS helper', () => {
test('returns information for Linux', () => {
jest.unmock('os')
const o = require.requireActual('os')
const o = jest.requireActual('os')
o.type = jest.fn(() => 'Linux')
expect(os.get()).toEqual({ name: 'Linux', type: 'linux' })
@ -27,7 +27,7 @@ describe('OS helper', () => {
test('returns information for macOS', () => {
jest.unmock('os')
const o = require.requireActual('os')
const o = jest.requireActual('os')
o.type = jest.fn(() => 'Darwin')
expect(os.get()).toEqual({ name: 'macOS', type: 'macos' })