Skip to content

Instantly share code, notes, and snippets.

View juliemr's full-sized avatar

Julie Ralph juliemr

  • Google
  • Seattle, WA
View GitHub Profile
@juliemr
juliemr / big_route_config.ts
Created December 22, 2017 01:20
Pantheon Router Woes
@NgModule({
id: 'jsmod_microkitchen_routes',
imports: [
RouterModule.forChild([
{
path: 'snacks',
children: [
{
path: '',
loadChildren: 'jsmod_microkitchen_snack_list',
// 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,
@juliemr
juliemr / mc
Last active August 31, 2017 18:55
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;
@juliemr
juliemr / logo-circle.svg
Last active January 4, 2017 00:17
Protractor circle only
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@juliemr
juliemr / protractor.svg
Created January 3, 2017 23:10
Protractor vector logo
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import {
inject,
async,
fakeAsync,
tick,
ComponentFixture,
TestBed,
} from '@angular/core/testing';
import {Component, NgModule} from '@angular/core';
import {
inject,
async,
fakeAsync,
tick,
TestComponentBuilder,
ComponentFixture,
TestBed,
} from '@angular/core/testing';
import {MdTabGroup, MdTabsModule} from './tabs';
/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
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) {
library angular2.src.testing.test_injector;
import "package:angular2/core.dart"
show
APP_ID,
APPLICATION_COMMON_PROVIDERS,
AppViewManager,
DirectiveResolver,
DynamicComponentLoader,
Injector,