From c7d141e304a2f61c559e6a5096161aba58623805 Mon Sep 17 00:00:00 2001 From: Piotr Roszatycki Date: Thu, 28 Sep 2017 16:31:33 +0200 Subject: [PATCH] Paragraph about typescript --- README.md | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index cf572d2..39c2515 100644 --- a/README.md +++ b/README.md @@ -29,15 +29,6 @@ const t = require('tap') require('tap-given')(t) require('chai').should() -// For Typescript: -// -// import * as chai from 'chai' -// import * as tap from 'tap' -// import { tapGiven } from 'tap-given' -// -// tapGiven(tap) -// chai.should() - Feature('TDD in Given-When-Then style for TAP', () => { Scenario('Basic scenario', () => { let a, b, c @@ -98,6 +89,16 @@ and are optional. All functions except `BeforeEach` and `AfterEach` add some prefix to the description of the step. +### Typescript + +Use following syntax instead `require`: + +```js +import * as tap from 'tap' +import { tapGiven } from 'tap-given' +tapGiven(tap) +``` + ### Linter Install `eslint-plugin-tap-given` module and use in `package.json`: