This file contains 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 fs = require("fs"); | |
const path = require("path"); | |
const directoryPath = "src"; | |
const rootFontSize = 16; | |
function convertFilesInDirectory(directoryPath) { | |
const files = fs.readdirSync(directoryPath); | |
for (const file of files) { |
This file contains 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
# Pyenv not found solve | |
After installing pyenv from the official installer docs - https://github.com/pyenv/pyenv-installer. | |
If you face problem that your pyenv is not recongnized. There can be situations that your `.bashrc` didn't updated | |
Open the `.bashrc` file and add following code there | |
``` | |
export PATH="~/.pyenv/bin:$PATH" | |
eval "$(pyenv init -)" |
This file contains 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 { Route, Switch } from 'react-router'; | |
import Dialog from '@material-ui/core/Dialog' | |
const ABC = ({ match, history, ...rest }) => { | |
return ( | |
<div> | |
<h1 | |
onClick={() => history.push(`${match.url}/2`)} |
This file contains 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
{ | |
"name": "moshfiqrony", | |
"version": "1.0.0", | |
"license": "MIT", | |
"scripts": { | |
"test": "jest --env=jest-environment-jsdom-sixteen --watch", | |
"start": "react-scripts start" | |
}, | |
"devDependencies": { | |
"@babel/core": "^7.10.2", |
This file contains 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
test('Component rendered successfully', async () => { | |
axios.get.mockImplementationOnce(() => Promise.resolve({ | |
status: 200, | |
data: { | |
name: 'Rony', | |
email: '[email protected]' | |
} | |
})) | |
const { container, getByTestId } = render(<ApiCallMock />); |