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
// app.component.ts | |
... | |
import { TransferState, makeStateKey } from '@angular/platform-browser'; | |
const PHOTOS = makeStateKey('photos'); | |
@Component({...}) | |
export class AppComponent implements OnInit { | |
opened: boolean; | |
photos: any[]; |
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 stylesRegexp = /<style ng-transition="thor">(.*?(\n))+.*?<\/style>/g |
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
describe('formatNumber function', () => { | |
it('works with strings', () => { | |
const formatted = formatNumber('12.45') | |
expect(formatted).toEqual('12,45') | |
}) | |
it('works with numbers', () => { | |
const formatted = formatNumber(12.45) |
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
describe('<PriceCard />', () => { | |
it('renders <PriceCard /> component', async () => { | |
const { container } = render( | |
<PriceCard data={mockData} onAddToCart={() => {}} /> | |
) | |
expect(container).toMatchSnapshot() | |
}) | |
}) |
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
describe('On submit form', () => { | |
it('the popover is rendered', async () => { | |
const store = createStore() | |
const { container, getByText, getByTestId } = render( | |
<ReduxProvider store={store}> | |
<CheckCoverageContainer /> | |
</ReduxProvider> | |
) |
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
storiesOf('my-front/UI/Button', module) | |
.add('Button', () => <ButtonsSet />) | |
.add('Button Link', () => ( | |
<> | |
<Button | |
variant="contained" | |
component="a" | |
href="https://google.es" | |
target="_blank" |
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
{ | |
"data": [ | |
"http://www.homerswebpage.com/", | |
"https://etereo.io/" | |
] | |
} |
OlderNewer