using assert with ts-node in mocha test

using assert with ts-node in mocha test

I created a mocha test in a test.ts

I created a mocha test in a test.ts

import * as assert from "assert";

describe('it', () => { it('should ', done => { assert.strictEqual(true, false); done(); }); });

My package.jsons devDependencies:

"devDependencies": {
    "@types/mocha": "^5.2.5",
    "@types/node": "^10.12.18",
    "mocha": "^5.2.0",
    "ts-node": "^8.0.1",
    "typescript": "^3.2.4"
  }

tsconfig.json:

{
  "compilerOptions": {
    "target": "es2015",
    "module": "commonjs",
    "sourceMap": true,
    "declaration": true,
    "outDir": "./dist",
    "strict": true,
    "types": ["mocha"]
  }
}

When running ts-node, I get this error:

error TS2307: Cannot find module 'assert'.

My commandline call is this:

./node_modules/mocha/bin/mocha -r ts-node/register test/test.ts

Regular tsc throws no errors.

Angular 9 Tutorial: Learn to Build a CRUD Angular App Quickly

What's new in Bootstrap 5 and when Bootstrap 5 release date?

Brave, Chrome, Firefox, Opera or Edge: Which is Better and Faster?

How to Build Progressive Web Apps (PWA) using Angular 9

What is new features in Javascript ES2020 ECMAScript 2020

How to Use Express.js, Node.js and MongoDB.js

In this post, I will show you how to use Express.js, Node.js and MongoDB.js. We will be creating a very simple Node application, that will allow users to input data that they want to store in a MongoDB database. It will also show all items that have been entered into the database.

Deno vs Node.js: Deno Will Replace Node.JS?

Deno vs Node.js: Deno Will Replace Node.JS? What’s Deno, and how is it different from Node.js? Node.js is Dead – Long live Deno! The goal of Deno is not to replace Node.js, but to offer an alternative.

Node.js for Beginners - Learn Node.js from Scratch (Step by Step)

Node.js for Beginners - Learn Node.js from Scratch (Step by Step) - Learn the basics of Node.js. This Node.js tutorial will guide you step by step so that you will learn basics and theory of every part. Learn to use Node.js like a professional. You’ll learn: Basic Of Node, Modules, NPM In Node, Event, Email, Uploading File, Advance Of Node.