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 renderer from 'react-test-renderer' | |
| import Viewport from '../Viewport' | |
| it('should render correctly', () => { | |
| const target = { | |
| innerHeight: 600, | |
| innerWidth: 800, | |
| addEventListener: jest.fn(), | |
| removeEventListener: jest.fn() | |
| } |
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
| Add the `replication` section to the mongod.conf file: | |
| ``` | |
| $cat /usr/local/etc/mongod.conf | |
| systemLog: | |
| destination: file | |
| path: /usr/local/var/log/mongodb/mongo.log | |
| logAppend: true | |
| storage: | |
| engine: mmapv1 |
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 { mountWithIntl } from 'helpers/intl-enzyme-test-helper.js'; | |
| const wrapper = mountWithIntl( | |
| <CustomComponent /> | |
| ); | |
| expect(wrapper.state('foo')).to.equal('bar'); // OK | |
| expect(wrapper.text()).to.equal('Hello World!'); // OK |
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
| // Allows: | |
| // funkyParser() | |
| module.exports = function createFunkyParser(opt) { | |
| return new FunkyParser(opt) | |
| } | |
| function FunkyParser(opt) { | |
| // make params optional | |
| opt = opt || {} |
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
| var a = 123, b = 'hello'; | |
| function test(x, y) { | |
| console.log(this); | |
| return a + x + b + y; | |
| } | |
| // Serialize a function *with its captured environment* | |
| var sf = serialize(test, { a: a, b: b }); | |
| // Deserialize with captured environment |
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
| option_settings: | |
| - option_name: AWS_SECRET_KEY | |
| value: ------------------------------------------- | |
| - option_name: AWS_ACCESS_KEY_ID | |
| value: ------------------------------ | |
| - option_name: PORT | |
| value: 8081 |