Skip to content

Commit

Permalink
f
Browse files Browse the repository at this point in the history
  • Loading branch information
fengmk2 committed Jan 11, 2025
1 parent 7c0c72f commit cfe1dd7
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/fixtures/jsonp-test/config/config.default.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,13 @@ module.exports = {
keys: 'keys',
jsonp: {
},
logger: {
consoleLevel: 'NONE',
level: 'NONE',
coreLogger: {
consoleLevel: 'NONE',
level: 'NONE',
},
disableConsoleAfterReady: true,
},
};
5 changes: 5 additions & 0 deletions test/jsonp.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { strict as assert } from 'node:assert';
import { mm, MockApplication } from '@eggjs/mock';

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

it('should access acceptJSONP return false by default', () => {
assert.equal(app.mockContext().acceptJSONP, false);
});

it('should support json', async () => {
await app.httpRequest()
.get('/default')
Expand Down

0 comments on commit cfe1dd7

Please sign in to comment.