0.1.1 • Published 4 years ago

sinon-typed v0.1.1

Weekly downloads
26
License
BSD-3-Clause
Repository
github
Last release
4 years ago

Sinon Typed Build Status Coverage Status

npm install --save-dev sinon
npm install --save-dev @types/sinon
npm install --save-dev sinon-typed

Usage

import * as assert from 'assert';
import {SinonTyped} from 'sinon-typed';

interface Test {
  aProperty: number;
  aMethod(arg: string): string;
}

const testStub = SinonTyped.stub<Test>();
testStub.stubMethod('aMethod').withArgs('value').returns('result');
testStub.stubProperty('aProperty').returns(42);
const test = testStub.object;
assert.equal(test.aMethod('value'), 'result');
assert.equal(test.aProperty, 42);
0.1.1

4 years ago

0.1.0

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago