mirror of
https://github.com/nestjs/nest.git
synced 2026-02-21 23:11:44 +00:00
22 lines
535 B
TypeScript
22 lines
535 B
TypeScript
import { expect } from 'chai';
|
|
import { NatsContext } from '../../ctx-host';
|
|
|
|
describe('NatsContext', () => {
|
|
const args: [string, any] = ['test', {}];
|
|
let context: NatsContext;
|
|
|
|
beforeEach(() => {
|
|
context = new NatsContext(args);
|
|
});
|
|
describe('getSubject', () => {
|
|
it('should return subject', () => {
|
|
expect(context.getSubject()).to.be.eql(args[0]);
|
|
});
|
|
});
|
|
describe('getHeaders', () => {
|
|
it('should return headers', () => {
|
|
expect(context.getHeaders()).to.be.eql(args[1]);
|
|
});
|
|
});
|
|
});
|