This is a temporary solution. Might change in the near future, this depends on how create-react-app will implement testing.
create-react-app quick-test-example
cd quick-test-example
npm run eject| #!/bin/bash | |
| TMP_DIR=`mktemp --directory` | |
| LIST_FILE=$TMP_DIR/docker.list | |
| DOCKER_GROUP="docker" | |
| apt-get update | |
| apt-get install apt-transport-https ca-certificates | |
| apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D |
| SELECT id, x | |
| FROM ( | |
| SELECT id, x | |
| FROM test | |
| WHERE x='y' | |
| LIMIT 1 | |
| ) t1 | |
| UNION ALL | |
| SELECT id, x | |
| FROM ( |
| 'use strict'; | |
| const path = require('path'); | |
| const webpack = require('webpack'); | |
| const production = process.env.NODE_ENV === 'production'; | |
| const babelPlugins = ['jsx-tagclass']; | |
| const babelProdPlugins = babelPlugins.concat( | |
| ['transform-react-constant-elements', 'transform-react-inline-elements'] |
| # | |
| # CORS header support | |
| # | |
| # One way to use this is by placing it into a file called "cors_support" | |
| # under your Nginx configuration directory and placing the following | |
| # statement inside your **location** block(s): | |
| # | |
| # include cors_support; | |
| # | |
| # As of Nginx 1.7.5, add_header supports an "always" parameter which |
| echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
| . ~/.bashrc | |
| mkdir ~/local | |
| mkdir ~/node-latest-install | |
| cd ~/node-latest-install | |
| curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
| ./configure --prefix=~/local | |
| make install # ok, fine, this step probably takes more than 30 seconds... | |
| curl https://www.npmjs.org/install.sh | sh |
| // https://github.com/alfonsomunozpomer/react-fetch-mock | |
| import React from 'react' | |
| import fetchMock from 'fetch-mock' | |
| import Enzyme from 'enzyme' | |
| import {shallow, mount, render} from 'enzyme' | |
| import Adapter from 'enzyme-adapter-react-16' | |
| Enzyme.configure({ adapter: new Adapter() }) |
| { | |
| "name": "exchange", | |
| "version": "1.0.0", | |
| "description": "Exchange frontend application", | |
| "main": "src/index.js", | |
| "author": "cinic", | |
| "license": "UNLICENSED", | |
| "private": true, | |
| "scripts": { | |
| "start": "babel-node server.js", |
| declare module ramda { | |
| declare type NestedMap<O: Object, P, T> = $Call<( | |
| & (<A, B, C, D, E>([A, B, C, D, E]) => $ElementType<$ElementType<$ElementType<$ElementType<$ElementType<O, A>, B>, C>, D>, E>) | |
| & (<A, B, C, D>([A, B, C, D]) => $ElementType<$ElementType<$ElementType<$ElementType<O, A>, B>, C>, D>) | |
| & (<A, B, C>([A, B, C]) => $ElementType<$ElementType<$ElementType<O, A>, B>, C>) | |
| & (<A, B>([A, B]) => $ElementType<$ElementType<O, A>, B>) | |
| & (<A>([A]) => $ElementType<O, A>) | |
| & (() => T) | |
| ), P> | |
| #!/bin/bash | |
| # | |
| # Inspects branch name and checks if it contains a Jira ticket number (i.e. ABC-123). | |
| # If yes, commit message will be automatically prepended with [ABC-123]. | |
| # | |
| # Useful for looking through git history and relating a commit or group of commits | |
| # back to a user story. | |
| # |