Skip to content

Commit 29d1aa0

Browse files
committed
Fix accounts test, add back other lib tests
1 parent 37bd4c2 commit 29d1aa0

File tree

8 files changed

+7
-28
lines changed

8 files changed

+7
-28
lines changed

packages/cli/src/lib/accounts/accounts.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {parse, stringify} from 'yaml'
2-
import * as fs from 'fs'
3-
import * as os from 'node:os'
4-
import * as path from 'node:path'
2+
import fs from 'node:fs'
3+
import os from 'node:os'
4+
import path from 'node:path'
55
import * as Heroku from '@heroku-cli/schema'
66

77
export interface IAccountsWrapper {

packages/cli/test/unit/lib/addons/resolve.unit.test.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
import {resolveAddon, appAddon} from '../../../../src/lib/addons/resolve.js'
22
import {getHerokuAPI} from '../../../helpers/testInstances.js'
33
import {expect} from 'chai'
4-
import * as nock from 'nock'
4+
import nock from 'nock'
55
import * as Heroku from '@heroku-cli/schema'
66
import {APIClient} from '@heroku-cli/command'
77

8-
/*
98
describe('resolve', function () {
109
let herokuAPI: APIClient
1110

@@ -90,7 +89,7 @@ describe('resolve', function () {
9089
})
9190
})
9291

93-
it('fails if no addon found', function () {
92+
it('fails if no addon found with an addon service', function () {
9493
const api = nock('https://api.heroku.com:443')
9594
.post('/actions/addons/resolve', {app: 'myapp', addon: 'myaddon-3', addon_service: 'slowdb'}).reply(404, {resource: 'add_on'})
9695
.post('/actions/addons/resolve', {app: null, addon: 'myaddon-3', addon_service: 'slowdb'}).reply(404, {resource: 'add_on'})
@@ -306,5 +305,3 @@ describe('resolve', function () {
306305
})
307306
})
308307
})
309-
310-
*/

packages/cli/test/unit/lib/addons/util.unit.test.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import * as util from '../../../../src/lib/addons/util.js'
22
import {expect} from 'chai'
33

4-
/*
54
describe('util.formatPrice', function () {
65
it('formats as "free" when cents is 0', function () {
76
expect(util.formatPrice({price: {cents: 0}, hourly: false})).to.eq('free')
@@ -33,5 +32,3 @@ describe('util.formatPrice', function () {
3332
})
3433
})
3534
})
36-
37-
*/

packages/cli/test/unit/lib/apps/generation.unit.test.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
import {expect} from 'chai'
22
import {APIClient} from '@heroku-cli/command'
33
import nock from 'nock'
4-
// import {getGeneration, getGenerationByAppId} from '../../../../src/lib/apps/generation'
4+
import {getGeneration, getGenerationByAppId} from '../../../../src/lib/apps/generation.js'
55
import {Config} from '@oclif/core'
66

7-
/*
87
describe('generation', function () {
98
describe('getGeneration', function () {
109
it('identifies fir generation from string format web-xxxxxxxxx-xxxxx', function () {
@@ -81,5 +80,3 @@ describe('generation', function () {
8180
})
8281
})
8382
})
84-
85-
*/

packages/cli/test/unit/lib/authorizations/authorizations.unit.test.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ const setupDisplay = (auth: Heroku.OAuthAuthorization) =>
88
.stdout()
99
.do(() => display(auth))
1010

11-
/*
1211
describe('display', function () {
1312
const authId = 'f6e8d969-129f-42d2-854b-c2eca9d5a42e'
1413
const authDesc = 'a cool auth'
@@ -94,5 +93,3 @@ describe('display', function () {
9493
})
9594
})
9695
})
97-
98-
*/

packages/cli/test/unit/lib/ci/pipelines.unit.test.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ const PIPELINE = {
1010
}
1111
const FLAGS = {pipeline: PIPELINE.id}
1212

13-
/*
1413
describe('pipelines.ts', function () {
1514
let herokuAPI: APIClient
1615

@@ -48,5 +47,3 @@ describe('pipelines.ts', function () {
4847
})
4948
})
5049
})
51-
52-
*/

packages/cli/test/unit/lib/clients/clients.unit.test.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import {expect, test} from '@oclif/test'
22

33
import {validateURL} from '../../../../src/lib/clients/clients.js'
44

5-
/*
65
describe('validateURL', function () {
76
describe('secure URLs', function () {
87
[
@@ -49,5 +48,3 @@ describe('validateURL', function () {
4948
})
5049
})
5150
})
52-
53-
*/

packages/cli/test/unit/lib/config/quote.test.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import {expect} from 'chai'
22

3-
import {parse, quote} from '../../../lib/config/quote.js'
3+
import {parse, quote} from '../../../../src/lib/config/quote.js'
44

5-
/*
65
describe('quote', function () {
76
[
87
['abc', 'abc'],
@@ -28,5 +27,3 @@ describe('quote', function () {
2827
})
2928
})
3029
})
31-
32-
*/

0 commit comments

Comments
 (0)