Skip to content

Commit cfe1dd7

Browse files
committed
f
1 parent 7c0c72f commit cfe1dd7

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

test/fixtures/jsonp-test/config/config.default.js

+9
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,13 @@ module.exports = {
22
keys: 'keys',
33
jsonp: {
44
},
5+
logger: {
6+
consoleLevel: 'NONE',
7+
level: 'NONE',
8+
coreLogger: {
9+
consoleLevel: 'NONE',
10+
level: 'NONE',
11+
},
12+
disableConsoleAfterReady: true,
13+
},
514
};

test/jsonp.test.ts

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { strict as assert } from 'node:assert';
12
import { mm, MockApplication } from '@eggjs/mock';
23

34
describe('test/jsonp.test.ts', () => {
@@ -12,6 +13,10 @@ describe('test/jsonp.test.ts', () => {
1213
after(() => app.close());
1314
afterEach(mm.restore);
1415

16+
it('should access acceptJSONP return false by default', () => {
17+
assert.equal(app.mockContext().acceptJSONP, false);
18+
});
19+
1520
it('should support json', async () => {
1621
await app.httpRequest()
1722
.get('/default')

0 commit comments

Comments
 (0)