15 lines
315 B
TypeScript
15 lines
315 B
TypeScript
import * as assert from 'assert';
|
|
|
|
import { MockPubSub, MockConsumer } from './mock';
|
|
|
|
describe('transport', () => {
|
|
it('pub_sub', () => {
|
|
const c = new MockConsumer();
|
|
const ps = new MockPubSub('foo', c);
|
|
ps.pub('foo');
|
|
ps.pub('bar');
|
|
ps.flush();
|
|
assert.deepEqual(c.omnoms, ['foo', 'bar']);
|
|
});
|
|
});
|