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:
parent
340054d8a7
commit
636602750a
@ -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' })
|
||||
|
Loading…
Reference in New Issue
Block a user