mirror of
https://github.com/eggjs/egg.git
synced 2024-12-04 07:14:30 +00:00
20 lines
429 B
JavaScript
20 lines
429 B
JavaScript
'use strict';
|
|
|
|
const request = require('supertest-as-promised');
|
|
const utils = require('../../utils');
|
|
|
|
describe('test/lib/plugins/static.test.js', () => {
|
|
let app;
|
|
before(() => {
|
|
app = utils.app('apps/static-server');
|
|
return app.ready();
|
|
});
|
|
|
|
it('should get exists js file', () => {
|
|
return request(app.callback())
|
|
.get('/public/foo.js')
|
|
.expect('alert(\'bar\');\n')
|
|
.expect(200);
|
|
});
|
|
});
|