// Copyright (c) Cratis. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. import { Constructor } from '@cratis/fundamentals'; import { Suite } from 'mocha'; export type ContextForSuite = (this: Suite, context: TContext) => void; export function given(contextType: Constructor, callback: ContextForSuite) { return function (this: Suite) { const context = new contextType(this); callback.call(this, context); }; }