Skip to content

Commit

Permalink
feat: ignore secure config
Browse files Browse the repository at this point in the history
  • Loading branch information
atian25 committed Dec 6, 2021
1 parent 55d27e6 commit 960646d
Show file tree
Hide file tree
Showing 6 changed files with 59 additions and 30 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Node.js CI

on:
push:
branches:
- main
- master
pull_request:
branches:
- main
- master
schedule:
- cron: '0 2 * * *'

jobs:
build:
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
node-version: [8, 10, 12, 14, 16]
os: [ubuntu-latest, windows-latest, macos-latest]

steps:
- name: Checkout Git Source
uses: actions/checkout@v2

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: Install Dependencies
run: npm i -g npminstall && npminstall

- name: Continuous Integration
run: npm run ci

- name: Code Coverage
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
13 changes: 0 additions & 13 deletions .travis.yml

This file was deleted.

15 changes: 0 additions & 15 deletions appveyor.yml

This file was deleted.

2 changes: 1 addition & 1 deletion lib/error_view.js
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ class ErrorView {
serializeAppInfo() {
return {
baseDir: this.app.config.baseDir,
config: util.inspect(this.app.config),
config: util.inspect(this.app.dumpConfigToObject().config.config),
};
}
}
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@
"autod": "autod"
},
"ci": {
"version": "8, 9"
"version": "8, 10, 12, 14, 16",
"type": "github"
},
"author": "dead_horse"
}
10 changes: 10 additions & 0 deletions test/onerror.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,16 @@ describe('test/onerror.test.js', () => {
.expect(400);
});

it('should ignore secure config on html response', () => {
return app.httpRequest()
.post('/test?status=400')
.send({ test: 1 })
.set('Content-Type', 'application/json')
.expect(/keys: '<String len: 7/)
.expect('Content-Type', 'text/html; charset=utf-8')
.expect(400);
});

it('should return parsing json error on json response', () => {
return app.httpRequest()
.post('/test?status=400')
Expand Down

0 comments on commit 960646d

Please sign in to comment.