Skip to content

Commit b6edd20

Browse files
committed
Add package version test
1 parent 4462118 commit b6edd20

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

test/run.js

+12
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,18 @@ describe('run', () => {
7373
return run(['', ''])
7474
})
7575

76+
it('uses version from package.json', async () => {
77+
mock('pathExists', () => true)
78+
mock('readJson', () => ({
79+
version: '2.0.0'
80+
}))
81+
mock('writeFile', (output, log) => {
82+
expect(log).to.include('v2.0.0')
83+
})
84+
85+
return run(['', '', '--package'])
86+
})
87+
7688
it('command line options override options from package.json', async () => {
7789
mock('pathExists', () => true)
7890
mock('readJson', () => ({

0 commit comments

Comments
 (0)