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 request = require("request"); | |
const cheerio = require("cheerio"); | |
const url = "https://medium.com/p/d5b52f24d53c"; | |
const element = url.split("/"); | |
const postId = element[element.length - 1]; | |
request(url, async (error, response, body) => { | |
if (error) { | |
console.log(error); |
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
"eslintConfig": { | |
"extends": ["airbnb", "prettier", "plugin:jsx-a11y/recommended"], | |
"settings": { | |
"import/resolver": { | |
"node": { | |
"paths": ["src"], | |
"extensions": [".js", ".jsx", ".ts", ".tsx"] | |
} | |
} | |
} |
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
Show hidden characters
{ | |
"compilerOptions": { | |
"baseUrl": "src" | |
}, | |
"include": ["src"] | |
} |
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
{ | |
"compilerOptions": { | |
"baseUrl": "src" | |
}, | |
"include": ["src"] | |
} |
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 { LINKS, STRINGS } from 'utils/constants'; | |
import Button from 'components/Button/Button'; | |
import styles from './App.module.css'; | |
function App() { | |
return ( | |
<div className={styles.App}> | |
<Button> | |
{STRINGS.HELLO} |
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 Button from '../../Button/Button'; | |
import { LINKS, STRINGS } from '../../../utils/constants'; | |
import styles from './App.module.css'; | |
function App() { | |
return ( | |
<div className={styles.App}> | |
<Button> | |
{STRINGS.HELLO} |
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 { counter } from "./demo"; | |
import { setSuitesData } from "../src/index"; | |
import data from "./data/demo1.data"; | |
beforeAll(() => { | |
return setSuitesData(data); | |
}); | |
describe("Simple mock", () => { | |
it("test success", () => { |
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 { DataMapper } from "../../src"; | |
const data: DataMapper = { | |
"/api/setCounter": [ | |
{ | |
request: { | |
method: "POST", | |
data: '{"id":1,"operate":1}', | |
}, | |
response: { |
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
module.exports = { | |
// ... | |
globals: { | |
host: "127.0.0.1", | |
port: "5000", | |
debug: false, | |
}, | |
// ... | |
} |
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 { run } from "../../src"; | |
export default async () => { | |
await run(); | |
}; |