Skip to content

Commit

Permalink
test: test getBuildList module export
Browse files Browse the repository at this point in the history
The functionality is already tested.  Add a test to ensure the named
export matches the tested internal function.

Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
  • Loading branch information
kevinoid committed Jan 3, 2022
1 parent 85150e5 commit 03b5f6b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
1 change: 0 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,6 @@ function formatDate(date) {
* @returns {!Array<!module:noderegression.BuildInfo>} Builds to bisect in
* commit order.
*/
// eslint-disable-next-line import/no-unused-modules
export { default as getBuildList } from './lib/get-build-list.js';

/** Performs regression range reduction, using bisection, on Node.js builds
Expand Down
10 changes: 9 additions & 1 deletion test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import assert from 'assert';
// TODO [engine:node@>=14]: import { readFile } from 'fs/promises'
import { promises as fsPromises } from 'fs';

import { bisectRange, bisectBuilds } from '../index.js';
import { bisectRange, bisectBuilds, getBuildList } from '../index.js';
import getBuildListPrivate from '../lib/get-build-list.js';

const { readFile } = fsPromises;

Expand Down Expand Up @@ -139,3 +140,10 @@ describe('bisectRange', () => {
);
});
});

describe('getBuildList', () => {
// Tests are in test/get-build-list.js
it('is exported from ./lib/get-build-list.js', () => {
assert.strictEqual(getBuildList, getBuildListPrivate);
});
});

0 comments on commit 03b5f6b

Please sign in to comment.