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
var server = require('../server'); | |
var supertest = require('supertest'); | |
describe("server", function () { | |
var request, | |
UserId; | |
before(function (done) { | |
request = supertest(server.listen(done)); |
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
export default class Tracks extends React.Component { | |
static loadTracks() { | |
let user = await UserActions.getUser(); | |
let playlists = await PlaylistsActions.getPlaylists(user); | |
let tracks = await TracksActions.getTracksByPlaylists(playlists); | |
}; | |
componentWillMount() { | |
//check if we already have some 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 state = { | |
users: { | |
list: {id1: user1, id2: user2}, | |
followers: {id1: [id2], id2: [id1]}, | |
following: {id1: [id2], id2: [id1]}, | |
interestingPersons: {id1: [id2], id2: [id1]}, | |
... | |
} | |
} |
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 initialTodosState = []; | |
const initialCounterState = 0; | |
function todos(state = initialTodosState, action) { | |
return state; | |
} | |
function counter(state = initialCounterState, action) { | |
return state; | |
} |
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 { | |
RECEIVED_NEW_RELEASES, | |
RECEIVED_FREE_MOVIES | |
} from '../constants/ActionTypes'; | |
import selectn from 'selectn'; | |
import { merge, union } from 'lodash'; | |
const initialState = { | |
allMovies: {}, |
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 'babel/polyfill'; | |
import 'isomorphic-fetch'; | |
import koa from 'koa'; | |
import favicon from 'koa-favicon'; | |
import serve from 'koa-static'; | |
import logger from 'koa-logger'; | |
import fs from 'fs'; | |
import path from 'path'; | |
import _ from 'lodash'; |
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 selectn from 'selectn'; | |
import { union } from 'lodash'; | |
/** | |
* list of default fields for all of our lists | |
* @type {{items: Array, isFetching: boolean, lastUpdated: null, didInvalidate: boolean, pagination: {}}} | |
*/ | |
export const defaultFields = { | |
items: [], | |
isFetching: false, |
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 calculateQuantity from '../calculateQuantity'; | |
const quantity = { | |
1920: 10, | |
1366: 8, | |
1024: 4, | |
1280: 6 | |
}; | |
describe('calculateQuantity function', () => { |
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
# Dockerfile for %example% project | |
FROM centos:centos7 | |
MAINTAINER Sergey Zelenov <[email protected]> | |
RUN yum update -y | |
# Install EPEL | |
RUN yum install -y epel-release |
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
it('should return response', async () => { | |
const result = await API.get('/test', {}); | |
expect(result).to.deep.equal({hello: 'world', meta: {status: 200}}); | |
}); |
OlderNewer