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 mongoose from 'mongoose'; | |
const connect = async () => { | |
await close(); | |
await mongoose.connect(`${process.env.MONGODB_DATABASE}Test`, { | |
// Mongoose options | |
}); | |
}; |
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 chai from 'chai'; | |
import createDatabase from '~/tests/createDatabase'; | |
chai.should(); | |
createDatabase({before, afterEach, after}, () => { | |
describe('My Awesome Feature', () => { | |
it('Should be the best in the world', () => { | |
// tests | |
}); |
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
#!/bin/bash | |
cd /tmp || exit | |
printf "Downloading Robo 3T...\n" | |
filename="${1:-robo3t-1.4.4-linux-x86_64-e6ac9ec}"; # Default: v1.4.4 | |
wget -q https://download.studio3t.com/robomongo/linux/$filename.tar.gz | |
if [ $? -ne 0 ];then | |
printf "Invalid package given.\n" | |
exit 1 | |
fi |
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
#!/bin/bash | |
BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD 2>/dev/null) | |
if [ -n "$BRANCH_NAME" ] && [ "$BRANCH_NAME" != "HEAD" ] && [ "$SKIP_PREPARE_COMMIT_MSG" != 1 ]; then | |
PREFIX_PATTERN='[A-Z]{2,}\-[0-9]{2,}' | |
[[ $BRANCH_NAME =~ $PREFIX_PATTERN ]] | |
PREFIX=${BASH_REMATCH[0]} | |
PREFIX_IN_COMMIT=$(grep -c "^$PREFIX\:" "$1") | |
if [[ -n "$PREFIX" ]] && ! [[ $PREFIX_IN_COMMIT -ge 1 ]]; then |