View gist:3769e64fafa0d1f7a6e848e827716f79
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
Verifying my Blockstack ID is secured with the address 1C9BfWgWvJLM7duXJBojwzjqj1xDyzdB8E https://explorer.blockstack.org/address/1C9BfWgWvJLM7duXJBojwzjqj1xDyzdB8E |
View file.txt
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
Verifying my Blockstack ID is secured with the address 1CL2HLfy1YEFQN6i5DsTBSWMYS5FKbthYk https://explorer.blockstack.org/address/1CL2HLfy1YEFQN6i5DsTBSWMYS5FKbthYk |
View jestGlobalMocks.ts
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
const mock = () => { | |
let storage = {}; | |
return { | |
getItem: key => key in storage ? storage[key] : null, | |
setItem: (key, value) => storage[key] = value || '', | |
removeItem: key => delete storage[key], | |
clear: () => storage = {}, | |
}; | |
}; |
View heroes.tsx
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 { Component } from '@stencil/core'; | |
@Component({ | |
tag: 'app-heroes', | |
styleUrl: 'heroes.css' | |
}) | |
export class Heroes { | |
render() { |
View heroes.spec.ts
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 { render } from '@stencil/core/testing'; | |
import { Heroes } from './heroes'; | |
describe('app-heroes', () => { | |
it('should build', () => { | |
expect(new Heroes()).toBeTruthy(); | |
}); | |
describe('rendering', () => { | |
beforeEach(async () => { |
View app-home.tsx
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
<div class='app-home'> | |
<app-heroes></app-heroes> | |
<stencil-route-link url='/profile/stencil'> | |
<button> | |
Profile page | |
</button> | |
</stencil-route-link> | |
</div> |
View hero.ts
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
export class Hero { | |
id: number; | |
name: string; | |
} |
View heroes.tsx
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 { Component } from '@stencil/core'; | |
import { Hero } from '../../models/hero'; | |
@Component({ | |
tag: 'app-heroes', | |
styleUrl: 'heroes.css' | |
}) | |
export class Heroes { | |
private hero:Hero = { |
View heroes.tsx
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 { Component, State } from '@stencil/core'; | |
import { Hero } from '../../models/hero'; | |
@Component({ | |
tag: 'app-heroes', | |
styleUrl: 'heroes.css' | |
}) | |
export class Heroes { | |
@State() private hero:Hero = { |
View mock-heroes.ts
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 { Hero } from '../../models/hero'; | |
export const HEROES: Hero[] = [ | |
{ id: 11, name: 'Mr. Nice' }, | |
{ id: 12, name: 'Narco' }, | |
{ id: 13, name: 'Bombasto' }, | |
{ id: 14, name: 'Celeritas' }, | |
{ id: 15, name: 'Magneta' }, | |
{ id: 16, name: 'RubberMan' }, | |
{ id: 17, name: 'Dynama' }, |
OlderNewer