mirror of
https://github.com/appium/appium.git
synced 2026-10-28 20:31:51 +08:00
23 lines
474 B
JavaScript
23 lines
474 B
JavaScript
// transpile:mocha
|
|
|
|
import { welcome } from '../../lib/express/static';
|
|
import chai from 'chai';
|
|
import chaiAsPromised from 'chai-as-promised';
|
|
import sinon from 'sinon';
|
|
|
|
|
|
chai.should();
|
|
chai.use(chaiAsPromised);
|
|
|
|
describe('welcome', () => {
|
|
it('should fill the template', async () => {
|
|
let res = {
|
|
send: sinon.spy()
|
|
};
|
|
await welcome({}, res);
|
|
|
|
res.send.calledOnce.should.be.true;
|
|
res.send.args[0][0].should.include('Let\'s browse!');
|
|
});
|
|
});
|