Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里生成的结构�所有版本都支持吗

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

什么版本?

};
}
}
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