Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
before(() => {
Returns({
description: "Success",
type: Test
})(Test, "test4", descriptorOf(Test, "test4"));
this.store = Store.fromMethod(Test, "test4");
});
it("should set the responses", () => {
before(() => {
Produces("text/html")(Test, "test", descriptorOf(Test, "test"));
this.store = Store.from(Test, "test", descriptorOf(Test, "test"));
});
it("should set the produces", () => {
it("should set attribut as not enumerable", () => {
NotEnumerable()(Test, "test");
expect(descriptorOf(Test, "test").enumerable).to.eq(false);
});
});
it("should create middleware", () => {
UseBefore.should.be.calledWithExactly(AuthenticatedMiddleware);
middleware.should.be.calledWithExactly(Test, "test", descriptorOf(Test, "test"));
});
});
it("should set attribut as not configurable", () => {
NotConfigurable()(Test, "test");
expect(descriptorOf(Test, "test").configurable).to.eq(false);
});
});
before(() => {
Consumes("text/html")(Test.prototype, "test", descriptorOf(Test, "test"));
this.store = Store.from(Test.prototype, "test", descriptorOf(Test, "test"));
});
it("should set the produces", () => {
before(() => {
Indexed()(Test, "test", descriptorOf(Test, "test"));
this.store = Store.from(Test, "test", descriptorOf(Test, "test"));
});
before(() => {
Store.from(RefTest).set(MONGOOSE_MODEL_NAME, "RefTest");
Ref(RefTest)(Test, "test", descriptorOf(Test, "test"));
this.store = Store.from(Test, "test", descriptorOf(Test, "test"));
});
before(() => {
this.parameters = [FakeMetadata, "test", descriptorOf(FakeMetadata, "test")];
this.cbStub = Sinon.stub();
this.fnStub = Sinon.stub().returns(this.cbStub);
Store.decorate(this.fnStub)(...this.parameters);
});
static store(target: any, propertyKey: string): Store {
return Store.from(target, propertyKey, descriptorOf(target, propertyKey));
}