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 'expect'; | |
import request from 'supertest'; | |
import app from '../app'; // the web server | |
const mockData = { | |
"article": { | |
"title": "", | |
"description": "Ever wonder how?", | |
"body": "You have to believe", | |
"tagList": ["reactjs", "angularjs", "dragons"] |
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
{"level":"debug","body":"[{\"id\":7347751,\"web_url\":\"https://gitlab.com/groups/pomerium-class\",\"name\":\"pomerium-class\",\"path\":\"pomerium-class\",\"description\":\"A group of identity providers\",\"visibility\":\"public\",\"share_with_group_lock\":false,\"require_two_factor_authentication\":false,\"two_factor_grace_period\":48,\"project_creation_level\":\"developer\",\"auto_devops_enabled\":null,\"subgroup_creation_level\":\"maintainer\",\"emails_disabled\":null,\"mentions_disabled\":null,\"lfs_enabled\":true,\"default_branch_protection\":2,\"avatar_url\":null,\"request_access_enabled\":true,\"full_name\":\"pomerium-class\",\"full_path\":\"pomerium-class\",\"created_at\":\"2020-03-06T16:39:45.803Z\",\"parent_id\":null,\"ldap_cn\":null,\"ldap_access\":null},{\"id\":7421252,\"web_url\":\"https://gitlab.com/groups/pomerium-kube\",\"name\":\"pomerium-kube\",\"path\":\"pomerium-kube\",\"description\":\"We talk about kubernetes\",\"visibility\":\"public\",\"share_with_group_lock\":false,\"require_two_facto |
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 diamond = (n) => { | |
// your solution | |
// weed out negative and even numbers | |
if (n <= 0 || n % 2 == 0) return ""; | |
let k = 0; // to create the count pattern | |
let row = parseInt((n + 1) / 2); | |
let diamondStructure = []; | |
const space = " "; | |
const star = "*"; |
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
// SETUP! DO NOT TOUCH! | |
const Mocha = require('mocha') | |
const chai = require('chai') | |
const { expect } = chai | |
const mocha = new Mocha() | |
mocha.suite.emit('pre-require', this, 'solution', mocha) | |
// END OF SETUP | |
// =========================================================================== |