Testy / TestyTs

✔️ Modern TypeScript testing framework.
http://testy.github.io
ISC License
123 stars 8 forks source link

Examples in readme are incomplete #95

Closed thgh closed 2 years ago

thgh commented 2 years ago

It's missing this line:

import { BeforeEach, expect, Test, TestSuite } from 'testyts';
Aboisier commented 2 years ago

Hi!

First of all, thanks for the suggestion! For the sake of keeping the README short, I will not add import statements to it. I believe most people would consider these trivial. I have added a simple example project in the examples folder though, and a link to the example in the readme.

Your issue will also serve as documentation for anyone who runs into the following error:

An error occured while executing the following command: C:\Program Files\nodejs\node.exe C:\some\folder\TestyTs\examples\simple\node_modules\testyts\build\testy.js. Error: "⨯ Unable to compile TypeScript: src/calculator.spec.ts(4,2): error TS2304: Cannot find name 'TestSuite'. src/calculator.spec.ts(8,4): error TS2304: Cannot find name 'BeforeEach'. src/calculator.spec.ts(13,4): error TS2304: Cannot find name 'Test'. src/calculator.spec.ts(14,4): error TS2304: Cannot find name 'TestCase'. src/calculator.spec.ts(15,4): error TS2304: Cannot find name 'TestCase'. src/calculator.spec.ts(21,5): error TS2304: Cannot find name 'expect'.

Thanks again!