Skip to content

Commit

Permalink
Export missing Types for public API (#595)
Browse files Browse the repository at this point in the history
* Export types in public API

Fixes #593

* Update api.test.ts
  • Loading branch information
tclindner committed Mar 10, 2022
1 parent 3773d17 commit b7594dd
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/api.ts
Original file line number Diff line number Diff line change
@@ -1 +1,11 @@
export {NpmPackageJsonLint} from './npm-package-json-lint';
export {NpmPackageJsonLint, NpmPackageJsonLintOptions} from './npm-package-json-lint';

export {LintIssue} from './lint-issue';

export {Severity} from './types/severity';

export {LinterResult} from './linter/linter';

export {PackageJsonFileLintingResult} from './types/package-json-linting-result';

export {PackageJsonFileAggregatedResultCounts, OverallAggregatedResultCounts} from './linter/results-helper';
28 changes: 28 additions & 0 deletions test/unit/api.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,32 @@ describe('api Unit Tests', () => {
test('NpmPackageJsonLint should be exported', () => {
expect(api).toHaveProperty('NpmPackageJsonLint');
});

test('NpmPackageJsonLintOptions should be exported', () => {
expect(api).not.toHaveProperty('NpmPackageJsonLintOptions');
});

test('LintIssue should be exported', () => {
expect(api).toHaveProperty('LintIssue');
});

test('Severity should be exported', () => {
expect(api).toHaveProperty('Severity');
});

test('LinterResult should be exported', () => {
expect(api).not.toHaveProperty('LinterResult');
});

test('PackageJsonFileLintingResult should be exported', () => {
expect(api).not.toHaveProperty('PackageJsonFileLintingResult');
});

test('PackageJsonFileAggregatedResultCounts should be exported', () => {
expect(api).not.toHaveProperty('PackageJsonFileAggregatedResultCounts');
});

test('OverallAggregatedResultCounts should be exported', () => {
expect(api).not.toHaveProperty('OverallAggregatedResultCounts');
});
});

0 comments on commit b7594dd

Please sign in to comment.