authelia/server/test/storage/mongo/MongoCollectionFactory.test.ts
Clement Michaud d8ff186303 Split client and server
Client and server now have their own tsconfig so that the transpilation is only
done on the part that is being modified.

It also allows faster transpilation since tests are now excluded from tsconfig.
They are compiled by ts-node during unit tests execution.
2017-10-07 00:49:42 +02:00

22 lines
664 B
TypeScript

import Assert = require("assert");
import Sinon = require("sinon");
import { MongoClientStub } from "../../mocks/connectors/mongo/MongoClientStub";
import { MongoCollectionFactory } from "../../../src/lib/storage/mongo/MongoCollectionFactory";
describe("MongoCollectionFactory", function () {
let mongoClient: MongoClientStub;
before(function() {
mongoClient = new MongoClientStub();
});
describe("create", function () {
it("should create a collection", function () {
const COLLECTION_NAME = "COLLECTION_NAME";
const factory = new MongoCollectionFactory(mongoClient);
Assert(factory.build(COLLECTION_NAME));
});
});
});