Light Weight Test Runner for Stackblitz

Image by Colin Behrens from Pixabay

Scenario

Approach

Dependencies

Approach

sum.ts

export function sum(x:number, y:number):number {
return x+y
}

sum.spec.ts

import { deepEqual } from 'assert'
import { sum } from './sum'
export function testSum() {
deepEqual(sum(1,1), 2, 'It should produce 2')
}

Import sum.spec.ts into index.ts and run testSum() .

Demo

Brought to You By Firefly Semantics

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store