Skip to content

Instantly share code, notes, and snippets.

View gregoryStarr's full-sized avatar

Gregory Starr gregoryStarr

View GitHub Profile
@gregoryStarr
gregoryStarr / jest it
Created June 18, 2021 19:35
just an it
it('Does stuff',()=>{
})
@gregoryStarr
gregoryStarr / Jest
Last active June 18, 2021 20:21
jestTest
beforeAll(()={
// mock out dependencies
const
})
describe('tests for the ContactService class',()=>{
it('Does stuff',()=>{
})
@gregoryStarr
gregoryStarr / keybase.md
Created April 19, 2020 22:36
Keybase Gist

Keybase proof

I hereby claim:

  • I am gregorystarr on github.
  • I am gstarrltd (https://keybase.io/gstarrltd) on keybase.
  • I have a public key whose fingerprint is EB05 5B62 5D00 4095 2CB9 665C A160 A8D5 4C26 52C2

To claim this, I am signing this object:

@gregoryStarr
gregoryStarr / Promise Chaining
Created July 10, 2018 16:46
chaining thens
// 77: Promise - chaining
// To do: make all tests pass, leave the assert lines unchanged!
describe('chaining multiple promises can enhance readability', () => {
describe('prerequisites for understanding', function() {
it('reminder: the test passes when a fulfilled promise is returned', function() {
return Promise.resolve('I am nice');
});
// 76: Promise - creation
// To do: make all tests pass, leave the assert lines unchanged!
describe('a promise can be created in multiple ways', function() {
describe('creating a promise fails when', function() {
it('using `Promise` as a function', function() {
function callPromiseAsFunction() {
Promise(arg);
// 75: Promise - basics
// To do: make all tests pass, leave the assert lines unchanged!
"use strict"
describe('a Promise represents an operation that hasn`t completed yet, but is expected in the future', function() {
it('`Promise` is a global function', function() {
const expectedType = 'function';
console.log(Promise)

{ProjectName} Architecture

Engineers

  • {engineerName}

Schema Planning

API Planning

Services

{ProjectName} Architecture

Engineers

  • {engineerName}

Schema Planning

API Planning

Services

@gregoryStarr
gregoryStarr / 0_reuse_code.js
Created January 8, 2016 02:19
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console