From 1a4507fe09e7284ab1e86b68ff78c8668ef4cd8a Mon Sep 17 00:00:00 2001 From: Mark Schroering Date: Fri, 20 Nov 2020 10:52:59 -0500 Subject: [PATCH] Fix issue with genomics list-tests options --- CHANGELOG.md | 10 +++++++++- lib/cmds/genomics_cmds/list-tests.js | 12 ++++++------ test/unit/commands/genomics-tests.test.js | 2 +- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cd58f6a..ccb7755 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [12.1.1] - 2020-11-20 + +### Fixed + +- Fixed the `genomics list-tests` command to list tests by project using the `--limit` option. + + ## [12.1.0] - 2020-11-03 ### Changed @@ -815,6 +822,7 @@ and `create-nantomics-vcf-import` - Replaced the `defaults` command with a `setup` command +[12.1.1]: https://github.com/lifeomic/cli/compare/v12.1.0...v12.1.1 [12.1.0]: https://github.com/lifeomic/cli/compare/v12.0.0...v12.1.0 [12.0.0]: https://github.com/lifeomic/cli/compare/v11.9.0...v12.0.0 [11.9.0]: https://github.com/lifeomic/cli/compare/v11.8.1...v11.9.0 @@ -910,4 +918,4 @@ and `create-nantomics-vcf-import` [5.2.1]: https://github.com/lifeomic/cli/compare/v5.2.0...v5.2.1 [5.2.0]: https://github.com/lifeomic/cli/compare/v5.1.0...v5.2.0 [5.1.0]: https://github.com/lifeomic/cli/compare/5.0.0...v5.1.0 -[5.0.0]: https://github.com/lifeomic/cli/compare/v4.0.0...5.0.0 +[5.0.0]: https://github.com/lifeomic/cli/compare/v4.0.0...5.0.0 \ No newline at end of file diff --git a/lib/cmds/genomics_cmds/list-tests.js b/lib/cmds/genomics_cmds/list-tests.js index 4b059c8..ac247da 100644 --- a/lib/cmds/genomics_cmds/list-tests.js +++ b/lib/cmds/genomics_cmds/list-tests.js @@ -13,17 +13,17 @@ exports.builder = yargs => { }).positional('subjectId', { describe: 'The subject ID.', type: 'string' - }).option('page-size (only used when listing by project)', { - describe: 'The page size', + }).option('page-size', { + describe: 'The page size (only used when listing by project)', type: 'number', alias: 'n', default: 25 - }).option('next-page-token (only used when listing by project)', { - describe: 'Next page token', + }).option('next-page-token', { + describe: 'Next page token (only used when listing by project)', alias: 't', type: 'string' - }).option('limit (only used when listing by project)', { - describe: 'The maximum number of items to return', + }).option('limit', { + describe: 'The maximum number of items to return (only used when listing by project)', alias: 'l', type: 'number' }).option('status', { diff --git a/test/unit/commands/genomics-tests.test.js b/test/unit/commands/genomics-tests.test.js index 9fb87cf..50b4378 100644 --- a/test/unit/commands/genomics-tests.test.js +++ b/test/unit/commands/genomics-tests.test.js @@ -51,7 +51,7 @@ test.serial.cb('The "list-tests" command should list tests for a project', t => getStub.onFirstCall().returns(res); callback = () => { t.is(getStub.callCount, 1); - t.is(getStub.getCall(0).args[1], '/v1/genomics/projects/project1/tests?pageSize=&nextPageToken='); + t.is(getStub.getCall(0).args[1], '/v1/genomics/projects/project1/tests?pageSize=25&nextPageToken='); t.is(printSpy.callCount, 1); t.deepEqual(printSpy.getCall(0).args[0], { items: [] }); t.end();