typescript-definition-tester
Version:
The purpose of this repository is to wrap the TypeScript compiler so that a consumer can easily test their ambient module declarations against example *.ts files. This module uses chai assertions so that a user can easily add this step to existing unit t
18 lines (16 loc) • 554 B
text/typescript
import * as ts from "typescript";
import * as tt from "../src/index";
import * as fs from "fs";
describe('ambient declaration tests', function () {
this.timeout(5000);
it('should compile examples successfully against typescript-definition-tester.d.ts', (done) => {
tt.compileDirectory(
'./test/examples',
(fileName: string) => {
console.log('fileName', fileName);
return fileName.indexOf('.ts') > -1;
},
() => done()
);
});
});