|
1 | 1 | import { describe, it, suite } from 'mocha' |
2 | 2 | import isEmpty from 'lodash.isempty' |
3 | | -import omit from 'lodash.omit' |
4 | 3 | import { expect } from 'chai' |
5 | 4 | import { TEMP_DIR } from './constants' |
6 | 5 | import { dvcReader, initializeDemoRepo, initializeEmptyRepo } from './util' |
@@ -77,50 +76,13 @@ suite('exp show --show-json', () => { |
77 | 76 | }) |
78 | 77 |
|
79 | 78 | describe('Empty Repository', () => { |
80 | | - it('should return the expected output', async () => { |
| 79 | + it('should return the default output', async () => { |
81 | 80 | await initializeEmptyRepo() |
82 | 81 | const output = await dvcReader.expShow(TEMP_DIR) |
83 | 82 |
|
84 | | - expect( |
85 | | - Object.keys(output), |
86 | | - 'should have at least two entries' |
87 | | - ).to.have.lengthOf.greaterThanOrEqual(2) |
88 | | - |
89 | | - const { workspace } = output |
90 | | - |
91 | | - expect(workspace, 'should have a workspace key').not.to.be.undefined |
92 | | - |
93 | | - const data = workspace.baseline.data |
94 | | - |
95 | | - expect( |
96 | | - data, |
97 | | - 'should have data inside of the workspace baseline' |
98 | | - ).to.be.an('object') |
99 | | - |
100 | | - expect(data?.timestamp, 'should have a timestamp').to.be.a('null') |
101 | | - |
102 | | - expect(data?.deps, 'should have deps inside of the workspace').to.be.an( |
103 | | - 'object' |
104 | | - ) |
105 | | - |
106 | | - expect(data?.outs, 'should have outs inside of the workspace').to.be.an( |
107 | | - 'object' |
108 | | - ) |
109 | | - |
110 | | - expect( |
111 | | - data?.metrics, |
112 | | - 'should have metrics inside of the workspace' |
113 | | - ).to.be.an('object') |
114 | | - |
115 | | - expect( |
116 | | - data?.params, |
117 | | - 'should not have params inside of the workspace' |
118 | | - ).to.be.a('undefined') |
119 | | - |
120 | | - for (const obj of Object.values(omit(output, 'workspace'))) { |
121 | | - expect(obj, 'should have a child object').to.be.an('object') |
122 | | - expect(obj.baseline, 'should have a baseline entry').to.be.an('object') |
123 | | - } |
| 83 | + expect(output).to.deep.equal({ |
| 84 | + workspace: { baseline: {} } |
| 85 | + }) |
124 | 86 | }) |
125 | 87 | }) |
126 | 88 | }) |
0 commit comments