Skip to content

Instantly share code, notes, and snippets.

const config = {
transform: {
'^.+\\.jsx?$': 'babel-jest',
},
testMatch: [
'**/__story__/**/*.story.js',
'./src/**/__story__/**/*.story.js',
'*.story.js',
],
}
const { resolve } = require('path')
const source = resolve(process.cwd(), 'src')
const web = resolve(process.cwd(), 'node_modules/@treact/web')
const webSource = resolve(web, 'src')
const tsExtensions = (platform, defaults) => [
...defaults,
`.${platform}.ts`,
'.native.ts',
//@flow
import {user} from './action'
class AddUser extends React.Component<{
addUser: typeof user.add
}, {username: string}> {
render() {
const {username, addUser} = this.props
return (