mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-12 17:04:57 +00:00
* AAE-30877 squash-merged improvement/AAE-30877-update-package-pdfjs-dist * AAE-30877 statically import pdf_viewer * AAE-30877 fix failing worker load * AAE-22975 attempt without excessive logs * AAE-22975 remove pdf_viewer from karma includes * AAE-22975 remove incorrect firstValueFrom * AAE-22975 await rendered event callback * AAE-22975 change pdf mock code * AAE-22975 change pdf mock code * AAE-22975 mock pdfjs-dist package in tests to improve performance * AAE-22975 fix pagesLoaded test * AAE-22975 fix insights tests * AAE-22975 un-focus pdf-viewer tests, remove logs * AAE-22975 add defer block * AAE-22975 add pdfjsLib injection token * AAE-22975 remove defer block * AAE-22975 change pdfjs import path * AAE-22975 change pdfjsviewer import path * AAE-22975 limit usage of direct PDFViewer * AAE-22975 cleanup
30 lines
1.2 KiB
TypeScript
30 lines
1.2 KiB
TypeScript
/*!
|
|
* @license
|
|
* Copyright © 2005-2025 Hyland Software, Inc. and its affiliates. All rights reserved.
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
|
|
import 'zone.js';
|
|
import 'zone.js/testing';
|
|
import { getTestBed } from '@angular/core/testing';
|
|
import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';
|
|
import pdfjsLibMock from './src/lib/viewer/components/mock/pdfjs-lib.mock';
|
|
|
|
// First, initialize the Angular testing environment.
|
|
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), {
|
|
teardown: { destroyAfterEach: true }
|
|
});
|
|
|
|
(window as any).pdfjsLib = pdfjsLibMock;
|