mirror of
https://github.com/nestjs/nest.git
synced 2026-02-21 23:11:44 +00:00
19 lines
496 B
TypeScript
19 lines
496 B
TypeScript
import { expect } from 'chai';
|
|
import { MergeWithValues } from '../../utils/merge-with-values.util';
|
|
|
|
describe('MergeWithValues', () => {
|
|
let type;
|
|
const data = { test: [1, 2, 3] };
|
|
class Test {}
|
|
|
|
beforeEach(() => {
|
|
type = MergeWithValues(data)(Test);
|
|
});
|
|
it('should enrich prototype with given values', () => {
|
|
expect(type.prototype).to.contain(data);
|
|
});
|
|
it('should set name of metatype', () => {
|
|
expect(type.name).to.eq(Test.name + JSON.stringify(data));
|
|
});
|
|
});
|