Skip to content

Commit

Permalink
fix: include loadConfig in private actions API (#324)
Browse files Browse the repository at this point in the history
- Fix instead of feat due to private API
  • Loading branch information
AriPerkkio committed Dec 31, 2021
1 parent 2c7f1b2 commit ecb4633
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
5 changes: 4 additions & 1 deletion lib/exports-for-compare-action.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
/**
* Undocumented private API for Github CI action eslint-remote-tester-compare-action
* Undocumented private API for Github CI actions:
* - `eslint-remote-tester-compare-action`
* - `eslint-remote-tester-run-action`
*/
export {
RESULT_PARSER_TO_COMPARE_TEMPLATE,
Expand All @@ -13,4 +15,5 @@ export {
} from '@file-client/file-constants';

export { default as validateConfig } from '@config/validator';
export { loadConfig } from '@config/load';
export { Config, ConfigToValidate } from '@config/types';
9 changes: 8 additions & 1 deletion test/integration/integration.action-exports.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,22 @@ test('exports validateConfig', async () => {
console.log = consolelog;
});

test('exports loadConfig', async () => {
expect(actionExports.loadConfig).toBeInstanceOf(Function);
});

test('exports typings', () => {
expect(fs.readFileSync('dist/exports-for-compare-action.d.ts', 'utf8'))
.toMatchInlineSnapshot(`
"/**
* Undocumented private API for Github CI action eslint-remote-tester-compare-action
* Undocumented private API for Github CI actions:
* - \`eslint-remote-tester-compare-action\`
* - \`eslint-remote-tester-run-action\`
*/
export { RESULT_PARSER_TO_COMPARE_TEMPLATE, Result, ComparisonResults, } from './file-client/result-templates';
export { RESULT_COMPARISON_CACHE, RESULTS_COMPARISON_CACHE_LOCATION, } from './file-client/file-constants';
export { default as validateConfig } from './config/validator';
export { loadConfig } from './config/load';
export { Config, ConfigToValidate } from './config/types';
//# sourceMappingURL=exports-for-compare-action.d.ts.map"
`);
Expand Down

0 comments on commit ecb4633

Please sign in to comment.