mirror of
https://github.com/zhigang1992/probot.git
synced 2026-06-16 11:50:10 +08:00
23 lines
432 B
JavaScript
23 lines
432 B
JavaScript
const expect = require('expect');
|
|
const Plugin = require('../lib/plugin');
|
|
|
|
class TestPlugin extends Plugin {
|
|
foo() {
|
|
|
|
}
|
|
}
|
|
|
|
describe('Plugin', () => {
|
|
const plugin = new TestPlugin();
|
|
|
|
describe('api', () => {
|
|
it('includes methods', () => {
|
|
expect(plugin.api.indexOf('foo') >= 0).toBe(true);
|
|
});
|
|
|
|
it('exludes constructor', () => {
|
|
expect(plugin.api.indexOf('constructor')).toBe(-1);
|
|
});
|
|
});
|
|
});
|