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
export const asyncValidate = (values) => { | |
if (values.lmsCourseGeneralInfo.productISBN && !ISBN_REGEXP.test(values.lmsCourseGeneralInfo.productISBN)) { | |
return sleep(100).then(() => { | |
// eslint-disable-next-line no-throw-literal | |
throw { | |
lmsCourseGeneralInfo: { | |
productISBN: VALIDATION_ERR_MESSAGE_PRODUCT_ID_FORMAT, | |
}, | |
}; | |
}); |
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
-------------------Tested component------------------- | |
// All required imports | |
export class App extends React.Component<Props> { | |
render() { | |
const { onClick } = this.props; | |
return ( | |
<> | |
<h1>Form</h1> | |
<input /> |
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
{ | |
"extends": [ | |
"standard", | |
"standard-react", | |
"plugin:react/recommended", | |
"plugin:jest/recommended", | |
"plugin:flowtype/recommended" | |
], | |
"plugins": [ | |
"react", |
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
my-app | |
├──README.md | |
├──node_modules | |
├──package.json | |
├──.gitignore | |
├──.eslintrc | |
├──public | |
│ ├──favicon.ico | |
│ ├──index.html |
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 java.util.ArrayList; | |
import java.util.List; | |
public class Main { | |
public static void main(String[] args) { | |
List<Integer> arr = new ArrayList(); | |
boolean run = true; | |
for (int i = 0; i < 10; i++) { | |
arr.add(i); |