File tree Expand file tree Collapse file tree 6 files changed +22
-27
lines changed Expand file tree Collapse file tree 6 files changed +22
-27
lines changed Original file line number Diff line number Diff line change 1+ {
2+ "extension" : [" ts" ],
3+ "spec" : " test/**/*.test.ts" ,
4+ "require" : [" ts-node/register" , " source-map-support/register" ],
5+ "package" : " ./package.json" ,
6+ "reporter" : " spec" ,
7+ "timeout" : 360000 ,
8+ "recursive" : true ,
9+ "watchExtension" : " ts"
10+ }
11+
Original file line number Diff line number Diff line change @@ -75,5 +75,5 @@ EXAMPLES
7575 ]
7676```
7777
78- _ See code: [ src/commands/api.ts] ( https://github.com/heroku/heroku-api-plugin/blob/v2.3 .0/src/commands/api.ts ) _
78+ _ See code: [ src/commands/api.ts] ( https://github.com/heroku/heroku-api-plugin/blob/v3.0 .0/src/commands/api.ts ) _
7979<!-- commandsstop -->
Original file line number Diff line number Diff line change 11{
22 "name" : " @heroku-cli/plugin-api" ,
33 "description" : " access the Heroku API directly" ,
4- "version" : " 2.3 .0" ,
4+ "version" : " 3.0 .0" ,
55 "author" : " Heroku" ,
66 "bugs" : {
77 "url" : " https://github.com/heroku/heroku-api-plugin/issues"
4848 " heroku-plugin"
4949 ],
5050 "license" : " ISC" ,
51- "mocha" : {
52- "require" : [
53- " ts-node/register" ,
54- " source-map-support/register"
55- ],
56- "watch-extensions" : " ts" ,
57- "recursive" : true ,
58- "reporter" : " spec" ,
59- "timeout" : 360000
60- },
6151 "oclif" : {
6252 "bin" : " heroku" ,
6353 "commands" : " ./lib/commands"
7464 "prepare" : " yarn build" ,
7565 "prepack" : " yarn build && oclif manifest" ,
7666 "pretest" : " yarn build && oclif manifest" ,
77- "test" : " nyc mocha test/**/*.test.ts" ,
67+ "test" : " nyc mocha --config .mocharc.json test/**/*.test.ts" ,
7868 "version" : " oclif readme && git add README.md"
7969 }
8070}
Original file line number Diff line number Diff line change 11import { expect , test } from '@oclif/test'
2- import * as nock from 'nock'
32
43describe ( 'api' , ( ) => {
54 test
@@ -23,13 +22,12 @@ describe('api', () => {
2322 . it ( 'adds leading slash' )
2423
2524 test
26- . add ( 'api' , ( ) => nock ( 'https://api.heroku.com' , {
25+ . nock ( 'https://api.heroku.com' , {
2726 reqheaders : { accept : 'application/vnd.heroku+json; version=3.foobar' } ,
28- } ) )
29- . do ( ( { api} ) => {
30- api . get ( '/hello' )
31- . reply ( 200 , 'hello!' )
32- } )
27+ } , api => api
28+ . get ( '/hello' )
29+ . reply ( 200 , 'hello!' ) ,
30+ )
3331 . stdout ( )
3432 . command ( [ 'api' , '/hello' , '--version=3.foobar' ] )
3533 . do ( ( { stdout} ) => expect ( stdout ) . to . equal ( 'hello!\n' ) )
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11{
22 "extends" : " ../tsconfig" ,
33 "compilerOptions" : {
4- "sourceMap" : true
4+ "sourceMap" : true ,
5+ "esModuleInterop" : true ,
6+ "allowSyntheticDefaultImports" : true
57 },
68 "include" : [
79 " ./**/*" ,
You can’t perform that action at this time.
0 commit comments