Stealing an idea from ember's settled
test helper.
Assuming these conditions are true in your unit tests -
- you're using Jest
- and Jest's fake timers
- and all your data requests are happening via
fetch
lihaoyi Ammonite$ amm | |
Loading... | |
Welcome to the Ammonite Repl 0.8.0 | |
(Scala 2.11.8 Java 1.8.0_112) | |
@ { | |
val funnyFilter = ammonite.terminal.Filter.simple(" ")((b, c, m) => | |
if (FunnyFrontEnd.nextLine == Nil) (b.take(c) ++ " " ++ b.drop(c), c+1) | |
else { | |
val head :: tail = FunnyFrontEnd.nextLine | |
FunnyFrontEnd.nextReader = new java.io.StringReader(head) |
#!/usr/bin/env python3 | |
"Generate all strings containing just ( and ) with parens balenced." | |
from itertools import count | |
def parens(): | |
def nested(x): | |
return ("(" * x) + (")" * x) if x > 0 else "" |
Stealing an idea from ember's settled
test helper.
Assuming these conditions are true in your unit tests -
fetch
import React from 'react'; | |
import styled from 'styled-components'; | |
import MakerPhoto from '../img/makerphoto.jpg'; | |
const MakerLink = () => ( | |
<Link target="_blank" rel="noopener" href="https://stephenfjohnson.com/"> | |
<Image src={MakerPhoto} /> | |
<Text>by Stephen</Text> | |
</Link> |
[12:14 AM] acreddy : are hooks value stored in fiber?
[10:40 AM] ghardin137 : not really
[10:50 AM] acemarke : @acreddy, @ghardin137 : yes they are, actually.
A "fiber" is a plain JS object that React uses to store bookkeeping information on each rendered component in the tree. The linked list of hooks is indeed stored as a field on the fiber for that component
npm install -g create-react-app
#!/boot/bzImage | |
# Linux kernel userspace initialization code, translated to bash | |
# (Minus floppy disk handling, because seriously, it's 2017.) | |
# Not 100% accurate, but gives you a good idea of how kernel init works | |
# GPLv2, Copyright 2017 Hector Martin <marcan@marcan.st> | |
# Based on Linux 4.10-rc2. | |
# Note: pretend chroot is a builtin and affects the current process | |
# Note: kernel actually uses major/minor device numbers instead of device name |
--- | |
Description: AWSAppSync DynamoDB Example | |
Resources: | |
GraphQLApi: | |
Type: "AWS::AppSync::GraphQLApi" | |
Properties: | |
Name: AWSAppSync DynamoDB Example | |
AuthenticationType: AWS_IAM | |
PostDynamoDBTableDataSource: |
{ | |
"$schema": "https://zed.dev/schema/themes/v0.1.0.json", | |
"name": "Vesper", | |
"author": "Rauno Freiberg", | |
"themes": [ | |
{ | |
"name": "Vesper", | |
"appearance": "dark", | |
"style": { | |
"border": "#101010", |