How to use the @angular/platform-server/testing/server.js.platformServerTesting function in @angular/platform-server

To help you get started, we’ve selected a few @angular/platform-server examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github angular / react-native-renderer / jasmine-test-shim.js View on Github external
.reduce(function(specFiles, paths) { return specFiles.concat(paths); }, []);

jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000;

jrunner.configureDefaultReporter({showColors: process.argv.indexOf('--no-color') === -1});

jrunner.onComplete(function(passed) { process.exit(passed ? 0 : 1); });
jrunner.projectBaseDir = __dirname;
jrunner.specDir = '';
jrunner.addSpecFiles(specFiles);

var testingPlatformServer = require('@angular/platform-server/testing/server.js');
var testing = require('@angular/core/testing.js');

testing.TestBed.initTestEnvironment(
  testingPlatformServer.ServerTestingModule, testingPlatformServer.platformServerTesting());
require('zone.js/dist/jasmine-patch.js');

jrunner.execute();