You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Jason Godesky edited this page Jul 28, 2026
·
1 revision
mockModules allows you to mock the presence of particular modules in your tests.
Parameters
installed: string[]
An array of the names of the modules you want to convince your test are really there.
Examples
import{describe,expect,it,vi}from'vitest'import{mockModules}from'@revolutionarygamesco/common-foundryvtt/mocks'import{checkModules}from'./check-module.ts'describe('checkModules',()=>{it('returns true if the module is present',()=>{mockModules)['necessary-module'])expect(checkModules()).toBe(true)})})