I hereby claim:
- I am jaroslav-kubicek on github.
- I am kubajz_pb (https://keybase.io/kubajz_pb) on keybase.
- I have a public key ASA5pEMcdSLPJ_sxYOlHoEmeVqcEZQ2bTdsfvnK3gggcIwo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
const path = require("path"); | |
function replacePathAlias(currentFilePath, importPath, pathMap) { | |
// if windows env, convert backslashes to "/" first | |
console.log(currentFilePath) | |
currentFilePath = path.posix.join(...currentFilePath.split(path.sep)); | |
const regex = createRegex(pathMap); | |
return importPath.replace(regex, replacer); |
/* @flow */ | |
import * as React from "react" | |
type Sex = "MALE" | "FEMALE" | "UNDEFINED" | |
type Props = $ReadOnly<{| | |
name: string, | |
sex: Sex, | |
address: ?React.Node, |
/* @flow */ | |
// uncomment this comment :) // flowlint unclear-type:error | |
// SEE https://flow.org/en/docs/linting/rule-reference/#toc-unclear-type | |
// "any" type - not very helpful | |
const foo: any = 42; | |
foo.bar.baz |
// @flow | |
import * as React from 'react'; | |
import { mount } from 'enzyme'; | |
import { QueryRenderer, graphql } from '@adeira/relay'; | |
import { createMockEnvironment, MockPayloadGenerator } from 'relay-test-utils'; | |
describe('Component', () => { | |
it('Shows something', () => { | |
const environment = createMockEnvironment(); |
// @flow | |
import * as React from 'react'; | |
import { createFragmentContainer, graphql } from 'react-relay'; | |
import { ThemeContext } from 'styled-components'; | |
import { withRouter } from 'react-router-dom'; | |
import { | |
Ticket, | |
Airplane, | |
InformationCircle, |
module.exports = { | |
entry: { | |
main: './src/app.js', | |
}, | |
output: { | |
// `filename` provides a template for naming your bundles (remember to use `[name]` or `[contenthash]`) | |
filename: '[name].bundle.js', | |
// `chunkFilename` provides a template for naming code-split bundles (optional) | |
chunkFilename: '[name].bundle.js', | |
// `path` is the folder where Webpack will place your bundles |
// -------------------------------------- | |
// Mock GraphQL requests with stubs. | |
// Inspiration: https://github.com/cypress-io/cypress-documentation/issues/122 | |
// -------------------------------------- | |
Cypress.Commands.add('visitWithMockedGraphQL', (page, stubs) => { | |
cy.visit(page, { | |
onBeforeLoad: win => { | |
cy.stub(win, 'fetch', handleFetch(stubs)); | |
}, | |
}); |
{ | |
"additional_bookings": { | |
"details": [] | |
}, | |
"arrival": { | |
"when": 0, | |
"where": { | |
"code": "VKO", | |
"name": "Moscow" | |
} |
I hereby claim:
To claim this, I am signing this object: