This file contains hidden or 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 React from 'react'; | |
import renderer from 'react-test-renderer'; | |
import Accordion from '../src/components/Accordion'; | |
describe('Accordion', () => { | |
it('renders the additional content on hover', () => { | |
const component = renderer.create( | |
<Accordion activeIndex={1} headlines={['Foo', 'Bar', 'Baz']} content={['Foo Content', 'Bar content', 'Baz content']} /> | |
); |
This file contains hidden or 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
exports[`Accordion renders the additional content on hover 1`] = ` | |
<ul> | |
<li> | |
<h3> | |
Foo | |
</h3> | |
</li> | |
<li> | |
<h3> | |
Bar |
This file contains hidden or 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
{ | |
"jest": { | |
"moduleNameMapper": { | |
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/__mocks__/fileMock.js", | |
"\\.(css|less|scss|sass)$": "identity-obj-proxy" | |
} | |
}, | |
} |
This file contains hidden or 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
$ npm install -g flow-bro # npm installation | |
$ yarn global add flow-bro # yarn installation | |
$ flow-bro get-untyped 2 | |
This may take a while, concurrency is limited to reduce the failure rate. | |
Why dont you go get a coffee, I will do the heavy lifting! | |
The following files have the least flow coverage: |
This file contains hidden or 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
./node_modules/.bin/prettier --write ./**/*.js # insert your prettier command here | |
if [ "$(git status --porcelain | wc -l)" != "0" ]; then exit 1 ; fi |
This file contains hidden or 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
box: node | |
build: | |
steps: | |
- script: | |
name: Install Exponent CLI | |
code: | | |
npm install -g exp | |
# A step that executes `npm install` command | |
- npm-install |
This file contains hidden or 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 express = require('express'); | |
const { BatchRecorder, Tracer, Annotation, ExplicitContext } = require('zipkin'); | |
const { HttpLogger } = require('zipkin-transport-http'); | |
const tracer = new Tracer({ | |
ctxImpl: new ExplicitContext(), | |
recorder: new BatchRecorder({ | |
logger: new HttpLogger({ | |
endpoint: 'http://localhost:9411/api/v1/spans', | |
}), |
This file contains hidden or 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 zipkin from "zipkin"; | |
import { HttpLogger } from "zipkin-transport-http"; | |
const tracer = new zipkin.Tracer({ | |
ctxImpl: new zipkin.ExplicitContext(), | |
recorder: new zipkin.BatchRecorder({ | |
logger: new HttpLogger({ | |
endpoint: 'http://localhost:9411/api/v2/spans', | |
jsonEncoder: zipkin.jsonEncoder.JSON_V2, | |
fetch |
This file contains hidden or 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 tracer = ... // See example above | |
tracer.scoped(() => { | |
const id = tracer.createRootId(); | |
tracer.setId(id); | |
tracer.recordAnnotation(new zipkin.Annotation.ClientSend()); | |
tracer.recordAnnotation(new zipkin.Annotation.Rpc("My Span")); |
This file contains hidden or 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 tracer = ... // like defined before | |
function loadFromLocalStorage() { return new Promise(...) } | |
tracer.local("load", loadFromLocalStorage()).then(loadedData => { | |
tracer.local("compute", () => { | |
runComputationOn(loadedData); | |
}); | |
}); |