(overrides: {} | null = null)
| 121 | * @param overrides Can add a new variable to Global or override an existing one. |
| 122 | */ |
| 123 | export function createTestingDocument(overrides: {} | null = null): Document { |
| 124 | const customGlobal = Object.assign({}, GlobalScope, overrides); |
| 125 | const document = new Document(customGlobal); |
| 126 | document.postMessage = () => {}; |
| 127 | document.isConnected = true; |
| 128 | document.appendChild((document.body = document.createElement('body'))); |
| 129 | |
| 130 | customGlobal.localStorage = createStorage(document, StorageLocation.Local, {}); |
| 131 | customGlobal.sessionStorage = createStorage(document, StorageLocation.Session, {}); |
| 132 | |
| 133 | return document; |
| 134 | } |
no test coverage detected
searching dependent graphs…