Skip to content

Commit e3dfaa4

Browse files
committed
test: set LOG_LEVEL in test
1 parent 21e1409 commit e3dfaa4

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

config/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# app:
1+
app:
22
# port: 3000
3-
# log_level: debug
3+
log_level: ignore
44
# crontime: "*/5 * * * *"
55

66
uptimerobot:

src/bootstrap/app.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ export function createAPP() {
4848
}
4949

5050
// start server
51-
export function createServer(app, port) {
52-
if (!port) port = app.context.config.app.port;
51+
export function createServer(app) {
52+
const port = app.context.config.app.port;
5353
return app.listen(port, function() {
5454
logger.info("Server starts at", port);
5555
});

test/test.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,9 @@ import superkoa from "superkoa";
33
import cheerio from "cheerio";
44
import { mockSucc, mockFail } from "./mock";
55
import { createAPP } from "../src/bootstrap/app";
6-
import { logger } from "../src/lib/logger";
76

87
test.beforeEach(({ context }) => {
98
context.app = createAPP();
10-
logger.setLevel("ignore");
119
});
1210

1311
test.serial("GET /", async t => {

0 commit comments

Comments
 (0)