This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@NgModule({ | |
id: 'jsmod_microkitchen_routes', | |
imports: [ | |
RouterModule.forChild([ | |
{ | |
path: 'snacks', | |
children: [ | |
{ | |
path: '', | |
loadChildren: 'jsmod_microkitchen_snack_list', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Here's an example of something we're trying to do, which I consider an integration test which also requires ActivatedRoute: | |
// The component (paired down) | |
@Component({ | |
templateUrl: './game_edit.ng.html', | |
}) | |
export class GameEdit implements OnInit { | |
constructor( | |
private readonly route: ActivatedRoute, private readonly router: Router, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let roll = () => { | |
return Math.floor(Math.random() * 6) | |
} | |
const plays = 1000000; | |
const NUM_DICE = 4; | |
let wins = 0; | |
for (let i = 0; i < plays; i++) { | |
let lenses = 0; |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { | |
inject, | |
async, | |
fakeAsync, | |
tick, | |
ComponentFixture, | |
TestBed, | |
} from '@angular/core/testing'; | |
import {Component, NgModule} from '@angular/core'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { | |
inject, | |
async, | |
fakeAsync, | |
tick, | |
TestComponentBuilder, | |
ComponentFixture, | |
TestBed, | |
} from '@angular/core/testing'; | |
import {MdTabGroup, MdTabsModule} from './tabs'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/tmp/reposss/mobile-toolkit/service-worker/worker on sw-testing | |
$ npm list | |
@angular/service-worker@0.2.0 /private/tmp/reposss/mobile-toolkit/service-worker/worker | |
├── @angular/common@2.0.0-rc.1 | |
├── @angular/compiler@2.0.0-rc.1 | |
├── @angular/core@2.0.0-rc.1 | |
├── @angular/platform-browser@2.0.0-rc.1 | |
├── @angular/platform-browser-dynamic@2.0.0-rc.1 | |
├─┬ broccoli-caching-writer@2.2.1 | |
│ ├─┬ broccoli-kitchen-sink-helpers@0.2.9 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var webdriver = require('selenium-webdriver'); | |
var promise = webdriver.promise; | |
var flow = promise.controlFlow(); | |
function logflow(prefix) { | |
console.log(prefix); | |
console.log(flow.getSchedule()); | |
} | |
function testFn(done) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library angular2.src.testing.test_injector; | |
import "package:angular2/core.dart" | |
show | |
APP_ID, | |
APPLICATION_COMMON_PROVIDERS, | |
AppViewManager, | |
DirectiveResolver, | |
DynamicComponentLoader, | |
Injector, |
NewerOlder