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 { expect } from 'chai'; | |
import * as sinon from 'sinon'; | |
import * as dayjs from 'dayjs'; | |
import * as mongoose from 'mongoose'; | |
import { set } from 'lodash'; | |
import * as sut from './paymentProviderSettlements.rules'; | |
import * as model from './paymentProviderSettlements.models'; | |
import * as paymentRules from '../../models/payments.rules'; | |
import { IPayments } from '../../models/payments.types'; | |
import { IPaymentProviderSettlements } from './paymentProviderSettlements.types'; |
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
Object.keys(data).sort().map((item, key) => { | |
const grouped = {}; | |
data[item].map(item => { | |
if (typeof grouped[item.type] === 'undefined') { | |
grouped[item.type] = { | |
name: item.type, | |
members: [item] | |
}; | |
} | |
else { |
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
Object.keys(productionDays) | |
.sort() | |
.map((productionDay) => { | |
const groupCastMembersByRoleType = {} | |
productionDays[productionDay].map((castMember) => { | |
if ( | |
typeof groupCastMembersByRoleType[castMember.type] === 'undefined' | |
) { | |
groupCastMembersByRoleType[castMember.type] = { | |
roleType: castMember.type, |
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
# This code is licensed from CircleCI to the user under the MIT license. See | |
# https://circleci.com/orbs/registry/licensing for details. | |
version: 2.1 | |
description: | | |
A set of tools for working with Amazon S3. Requirements: bash | |
Source: https://github.com/circleci-public/circleci-orbs | |
examples: | |
basic_commands: |
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
version:2.1 |
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 slide through gallery', async () => { | |
const gallery = await browser.$('.open-gallery-button') | |
await gallery.click() | |
await delay(2000) | |
const rightSwipe = await browser.$('.right-arrow') | |
await rightSwipe.click() | |
await delay(2000) | |
const paragraph = await browser.$$( | |
'div:nth-of-type(3) .caption-drawer .post-content p' | |
) |
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
// Use the componentDidMount function to use the | |
// handlepic function we just created and therefore | |
// render the picture to the screen | |
componentDidMount() { | |
this.handlepic() | |
} |
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
// We're creating a function to handle retrieving | |
// the image from the NASA API | |
// Function is asynchronous because talking to the API | |
// isn't instantaneous (your bartender can't instantly | |
// give you your drink when you ask him for it) | |
handlePic = async () => { | |
// Create a response variable that retrieves the data | |
const response = await nasa.get() | |
// Change the state of picture to be the hdurl |
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
{ | |
"date": "2019-02-10", | |
"explanation": "What does Venus look like beneath its thick clouds? These clouds keep the planet's surface hidden from even the powerful telescopic eyes of Earth-bound astronomers. In the early 1990s, though, using imaging radar, NASA's Venus-orbiting Magellan spacecraft was able to lift the veil from the face of Venus and produced spectacular high resolution images of the planet's surface. Colors used in this computer generated picture of Magellan radar data are based on color images from the surface of Venus transmitted by the Soviet Venera 13 and 14 landers. The bright area running roughly across the middle represents the largest highland region of Venus known as Aphrodite Terra. Venus, on the left, is about the same size as our Earth, shown to the right for comparison.", | |
"hdurl": "https://apod.nasa.gov/apod/image/1902/VenusEarth_MagellanApollo17_3000.jpg", | |
"media_type": "image", | |
"service_version": "v1", | |
"title": "Venus Unveiled", | |
"url": "https://apod.nasa.gov/apod/image/1902/Ve |
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 axios from 'axios' | |
// Create a KEY variable for the NASA API key you received earlier | |
// Make sure it's in quotations | |
const KEY = 'YOUR KEY' | |
// Create a nasa variable that we will use to perform our API request | |
// Axios is going to create a url for us that conforms to NASA's | |
// specifications | |
let nasa = axios.create({ |
NewerOlder