language: node_js
node_js:
- 8
cache: yarn
script:
- yarn build
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 { randomUUID } from "crypto" | |
| import { writeFile } from "fs/promises" | |
| import { join } from "path" | |
| interface Job { | |
| url: string | |
| type: "assets" | "events" | |
| } | |
| const jobs: Job[] = [ |
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
| { | |
| "[javascript]": { | |
| "editor.acceptSuggestionOnEnter": "on", | |
| "editor.suggestSelection": "recentlyUsedByPrefix", | |
| }, | |
| "javascript.implicitProjectConfig.checkJs": false, | |
| "beautify.options": { | |
| "tabSize": 2 | |
| }, | |
| "typescript.tsserver.log": "verbose", |
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 { | |
| withState, | |
| compose, | |
| withHandlers, | |
| branch, | |
| lifecycle, | |
| onlyUpdateForKeys, | |
| withReducer, | |
| } from 'recompose'; |
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, {Component, PureComponent} from 'react'; | |
| import ReactDOM from 'react-dom'; | |
| import './index.css'; | |
| // [2,3,4] == [1, 2, 3].map(function (x) { return x + 1 }) | |
| // a = [1, 2, 3] | |
| // [1, 2, 3, 4] === b = [...a, 4] | |
| const pureHOC = WrappedComponent => { | |
| return class PureHOC extends PureComponent { |
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, {Component} from 'react'; | |
| import ReactDOM from 'react-dom'; | |
| import './index.css'; | |
| class App extends Component { | |
| state = { | |
| data: [1, 2, 3] | |
| }; | |
| handleClick = () => { |
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, {Component, PureComponent} from 'react'; | |
| import ReactDOM from 'react-dom'; | |
| import './index.css'; | |
| class App extends Component { | |
| state = { | |
| data: [1, 2, 3] | |
| }; | |
| handleClick = () => { |
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, {Component} from 'react'; | |
| import ReactDOM from 'react-dom'; | |
| import './index.css'; | |
| class App extends Component { | |
| state = { | |
| counter: 0, | |
| error: null, | |
| errorInfo: null | |
| }; |
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, {PureComponent} from 'react'; | |
| import ReactDOM from 'react-dom'; | |
| import './index.css'; | |
| let id = 0; | |
| function getTodoId() { | |
| id += 1; | |
| return id; | |
| } |
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 profileReducer from '../profile' | |
| import {changeEmail, changeFirstName, changeLastName} from 'actions/profileActions' | |
| describe('Profile reducer', () => { | |
| test('#reducer init value', () => { | |
| expect(profileReducer(undefined, {})).toEqual({firstName: '', lastName: '', email: ''}) | |
| }) | |
| test('#changeEmail', () => { | |
| const initState = profileReducer(undefined, {}) |
NewerOlder