add tap-color for proper test exit codes

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2020-03-20 12:09:25 +01:00 committed by Jakub
parent 6356862336
commit 18ed7eefb6
2 changed files with 7 additions and 3 deletions

5
app.js
View File

@ -15,12 +15,15 @@ app.set('view engine', 'ejs');
// accept the X-Forwarded-* headers
app.set('trust proxy', true)
app.use(morgan('tiny'))
app.use(express.json());
app.use(express.urlencoded({ extended: false }));
app.use(cookieParser());
app.use(express.static(path.join(__dirname, 'public')));
if (process.env.NODE_ENV == 'development') {
app.use(morgan('tiny'))
}
app.use('/', indexRouter);
// catch 404 and forward to error handler

View File

@ -4,9 +4,9 @@
"private": true,
"scripts": {
"start": "node ./bin/www",
"watch": "nodemon ./bin/www",
"watch": "NODE_ENV=development nodemon ./bin/www",
"docker": "yarn run tests && docker build -t statusteam/universal-links-handler:deploy .",
"tests": "node -r esm tests/main.js"
"tests": "node -r esm tests/main.js | tap-color"
},
"dependencies": {
"cookie-parser": "~1.4.3",
@ -24,6 +24,7 @@
"esm": "^3.2.25",
"nodemon": "^1.17.5",
"supertest": "^4.0.2",
"tap-color": "^1.2.0",
"zora": "^3.1.8"
}
}