diff --git a/developer/js/package.json b/developer/js/package.json index c6349af705..21bc00aa8d 100644 --- a/developer/js/package.json +++ b/developer/js/package.json @@ -6,7 +6,7 @@ "types": "dist/index.d.ts", "scripts": { "build": "npx tsc -p .", - "test": "echo \"Error: no test specified\" && exit 1" + "test": "mocha -r ts-node/register tests/**/test-*.ts" }, "author": "Marc Durdin (SIL)", "license": "MIT", diff --git a/developer/js/tests/test-hello-world.ts b/developer/js/tests/test-hello-world.ts index c9b6154ea5..4c1a37c39c 100644 --- a/developer/js/tests/test-hello-world.ts +++ b/developer/js/tests/test-hello-world.ts @@ -1,11 +1,11 @@ import LexicalModelCompiler from '../'; -import {expect} from 'chai'; +import {assert} from 'chai'; import 'mocha'; describe('LexicalModelCompiler', function () { describe('#hello()', function () { it('should say "hello"', function () { - expect((new LexicalModelCompiler).hello()).to.be('Hello, world!'); + assert.strictEqual((new LexicalModelCompiler).hello(), 'Hello, world!'); }); }); });