Skip to content

Instantly share code, notes, and snippets.

# 1 make your app listen on a port while serving (here we'll use the common 8100 port)
# 2 Run
sudo docker run -it -p 8100:8100 -v /local_project_folder:/docker_project_folder -e ENV_VAR=content -e ANOTHER_ENV_VAR=anothercontenxt image_name
@StephaneTrebel
StephaneTrebel / test.js
Last active February 27, 2020 08:08
Unit testing in nodejs with proxyquire and sinon
// Awesomeness first
const _ = require('lodash');
const proxyquire = require('proxyquire');
const sinon = require('sinon');
// Mocha + Chai are used here but feel free to use your test framework of choice !
const chai = require('chai');
const chaiAsPromised = require('chai-as-promised');
chai.use(chaiAsPromised);