@@ -8,18 +8,11 @@ const repoVersion = require('ipfs-repo').repoVersion
8
8
const pkgversion = require ( '../../package.json' ) . version
9
9
const runOnAndOff = require ( '../utils/on-and-off' )
10
10
11
- function getRepoVersion ( repoPath ) {
12
- const versionPath = path . join ( repoPath , 'version' )
13
- return String ( fs . readFileSync ( versionPath ) )
14
- }
15
-
16
11
describe ( 'version' , ( ) => runOnAndOff ( ( thing ) => {
17
12
let ipfs
18
- let repoVersion
19
13
20
14
before ( ( ) => {
21
15
ipfs = thing . ipfs
22
- repoVersion = getRepoVersion ( ipfs . repoPath )
23
16
} )
24
17
25
18
it ( 'get the version' , ( ) =>
@@ -68,31 +61,9 @@ describe('version', () => runOnAndOff((thing) => {
68
61
)
69
62
} )
70
63
71
- it ( 'handles --number' , ( ) => {
72
- return ipfs ( 'version --number' ) . then ( out =>
73
- expect ( out ) . to . eql ( `${ pkgversion } \n` )
74
- )
75
- } )
76
-
77
- it ( 'handles --commit' , ( ) => {
78
- return ipfs ( 'version --commit' ) . then ( out =>
79
- expect ( out ) . to . eql ( `js-ipfs version: ${ pkgversion } -\n` )
80
- )
81
- } )
82
-
83
- it ( 'handles --all' , ( ) => {
84
- return ipfs ( 'version --all' ) . then ( out =>
85
- expect ( out ) . to . include (
86
- `js-ipfs version: ${ pkgversion } -
87
- Repo version: ${ repoVersion }
88
- `
89
- )
90
- )
91
- } )
92
-
93
- it ( 'handles --repo' , ( ) => {
94
- return ipfs ( 'version --repo' ) . then ( out => {
64
+ it ( 'handles --repo' , ( ) =>
65
+ ipfs ( 'version --repo' ) . then ( out =>
95
66
expect ( out ) . to . eql ( `${ repoVersion } \n` )
96
- } )
97
- } )
67
+ )
68
+ )
98
69
} ) )
0 commit comments