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
//snsihwdihwidhiwdi |
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 { shallow } from 'enzyme'; | |
import toJson from 'enzyme-to-json'; | |
import Bar from '../Bar'; | |
describe('Bar', () => { | |
it('should render properly', () => { | |
const data = 'fake'; | |
const wrapper = shallow( | |
<Bar data={data} /> |
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 sleep = ms => new Promise(resolve => setTimeout(resolve, ms)); | |
export default (async function showResults(values) { | |
await sleep(500); // simulate server latency | |
window.alert(`You submitted:\n\n${JSON.stringify(values, null, 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
import fetchData from './Api'; | |
describe('API Caller', () => { | |
it('should call YesNo API', () => { | |
const fetchSpy = jest.spyOn(global, 'fetch') | |
.mockImplementation(() => Promise.resolve({ | |
json: () => {}, | |
})); | |
return fetchData() |
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 createItem from '../createItem'; | |
import { connect } from 'react-redux'; | |
import { selectItem } from '../../selectors/itemSelectors'; | |
jest.resetModules(); | |
jest.mock('react-redux'); | |
const WrappedComponent = () => (<li />); | |
let mapStateToProps; |
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
//go back as manny commits as you need | |
git reset --soft HEAD~4 | |
git commit | |
git push --force origin my_branch |
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
create an empty firebase-messaging-sw.js inside the public folder |
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
node node_modules\eslint\bin\eslint.js --fix app/** |
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
sudo -i -u couchdb /home/couchdb/bin/couchdb |
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 { sortBy, orderBy } = require('lodash'); | |
const filteredGames = [ | |
{ name: 'game2', discountActive: 1, price: 5, priceDiscounted: 4 }, | |
{ name: 'game6', discountActive: 1, price: 20, priceDiscounted: 8 }, | |
{ name: 'game5', discountActive: 0, price: 10, priceDiscounted: 9 }, | |
{ name: 'game3', discountActive: 0, price: 11, priceDiscounted: 10 }, | |
{ name: 'game4', discountActive: 1, price: 22, priceDiscounted: 17 }, | |
{ name: 'game1', discountActive: 0, price: 21, priceDiscounted: 18 }, | |
]; |
OlderNewer