16e7c69efSopenharmony_ci/* 26e7c69efSopenharmony_ci * Copyright (c) 2023 Huawei Device Co., Ltd. 36e7c69efSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 46e7c69efSopenharmony_ci * you may not use this file except in compliance with the License. 56e7c69efSopenharmony_ci * You may obtain a copy of the License at 66e7c69efSopenharmony_ci * 76e7c69efSopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 86e7c69efSopenharmony_ci * 96e7c69efSopenharmony_ci * Unless required by applicable law or agreed to in writing, software 106e7c69efSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 116e7c69efSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 126e7c69efSopenharmony_ci * See the License for the specific language governing permissions and 136e7c69efSopenharmony_ci * limitations under the License. 146e7c69efSopenharmony_ci */ 156e7c69efSopenharmony_ci 166e7c69efSopenharmony_ciimport { Test, TestingModule } from '@nestjs/testing'; 176e7c69efSopenharmony_ciimport { AppController } from './app.controller'; 186e7c69efSopenharmony_ciimport { AppService } from './app.service'; 196e7c69efSopenharmony_ci 206e7c69efSopenharmony_cidescribe('AppController', () => { 216e7c69efSopenharmony_ci let appController: AppController; 226e7c69efSopenharmony_ci 236e7c69efSopenharmony_ci beforeEach(async () => { 246e7c69efSopenharmony_ci const app: TestingModule = await Test.createTestingModule({ 256e7c69efSopenharmony_ci controllers: [AppController], 266e7c69efSopenharmony_ci providers: [AppService], 276e7c69efSopenharmony_ci }).compile(); 286e7c69efSopenharmony_ci 296e7c69efSopenharmony_ci appController = app.get<AppController>(AppController); 306e7c69efSopenharmony_ci }); 316e7c69efSopenharmony_ci 326e7c69efSopenharmony_ci describe('root', () => { 336e7c69efSopenharmony_ci it('should return "Hello World!"', () => { 346e7c69efSopenharmony_ci expect(appController.getHello()).toBe('Hello World!'); 356e7c69efSopenharmony_ci }); 366e7c69efSopenharmony_ci }); 376e7c69efSopenharmony_ci}); 38