Vim/test/error.test.ts
Jason Fields 7e8924aea7 Convert var to const/let
Also enforce it with a tslint rule.
See the style guide for why const/let are preferred.
2019-08-23 01:50:16 -04:00

16 lines
416 B
TypeScript

import * as assert from 'assert';
import { ErrorCode, ErrorMessage } from '../src/error';
suite('Error', () => {
test('error code has message', () => {
/* tslint:disable:forin */
for (const errorCodeString in ErrorCode) {
const errorCode = Number(errorCodeString);
if (!isNaN(errorCode)) {
assert.notEqual(ErrorMessage[errorCode], undefined, errorCodeString);
}
}
});
});