当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript testing.platformServerTesting函数代码示例

本文整理汇总了TypeScript中@angular/platform-server/testing.platformServerTesting函数的典型用法代码示例。如果您正苦于以下问题:TypeScript platformServerTesting函数的具体用法?TypeScript platformServerTesting怎么用?TypeScript platformServerTesting使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了platformServerTesting函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: task

task('test:ssr', [':test:build'], (done: () => void) => {
  const baseUrl = join(projectDir, 'dist', 'packages', 'flex-layout');
  const paths = {
    '@angular/flex-layout/*': ['./*']
  };
  register({baseUrl, paths});
  const jasmine = new (require('jasmine'))({projectBaseDir: projectDir});
  require('zone.js');
  require('zone.js/dist/zone-testing');
  const {TestBed} = require('@angular/core/testing');
  const {ServerTestingModule, platformServerTesting} = require('@angular/platform-server/testing');
  let testBed = TestBed.initTestEnvironment(
    ServerTestingModule,
    platformServerTesting()
  );

  patchTestBed(testBed);
  jasmine.loadConfigFile('test/jasmine-ssr.json');
  jasmine.execute();
  done();
});
开发者ID:marffox,项目名称:flex-layout,代码行数:21,代码来源:unit-test-ssr.ts

示例2: platformServerTesting

import 'reflect-metadata';
import {platformServerTesting, ServerTestingModule} from '@angular/platform-server/testing';
import { TestBed } from '@angular/core/testing';

TestBed.initTestEnvironment(ServerTestingModule, platformServerTesting());
开发者ID:ubiquits,项目名称:quickstart,代码行数:5,代码来源:bootstrap.spec.ts

示例3: beforeEach

beforeEach((done) => {
  platformServerTesting().bootstrapModuleFactory(MainModuleNgFactory).then((moduleRef: any) => {
    mainModuleRef = moduleRef;
    done();
  });
});
开发者ID:AnthonyPAlicea,项目名称:angular,代码行数:6,代码来源:util.ts

示例4: beforeEach

 beforeEach(() => {
   TestBed.initTestEnvironment(ServerTestingModule, platformServerTesting(), SomeModuleNgSummary);
 });
开发者ID:AnthonyPAlicea,项目名称:angular,代码行数:3,代码来源:jit_summaries_spec.ts


注:本文中的@angular/platform-server/testing.platformServerTesting函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。