The window property can be mocked like that:
import { System } from 'systemjs'
Object.defineProperty(window, 'System', { value: System })
For some reason I can't explain, this needs to happen before the import (!) of the component that is being tested.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…