北斗短报文通信服务平台
This commit is contained in:
23
test/app/controller/home.test.js
Normal file
23
test/app/controller/home.test.js
Normal file
@@ -0,0 +1,23 @@
|
||||
const { strict: assert } = require('node:assert');
|
||||
const path = require('node:path');
|
||||
const { statSync } = require('node:fs');
|
||||
const { app } = require('egg-mock/bootstrap');
|
||||
|
||||
describe('test/app/controller/home.test.js', () => {
|
||||
it('should assert', async () => {
|
||||
const pkg = require('../../../package.json');
|
||||
assert(app.config.keys.startsWith(pkg.name));
|
||||
});
|
||||
|
||||
it('should typings exists', async () => {
|
||||
const typings = path.join(__dirname, '../../../typings');
|
||||
assert(statSync(typings));
|
||||
});
|
||||
|
||||
it('should GET /', async () => {
|
||||
return app.httpRequest()
|
||||
.get('/')
|
||||
.expect('hi, egg')
|
||||
.expect(200);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user