File tree 2 files changed +31
-0
lines changed
2 files changed +31
-0
lines changed Original file line number Diff line number Diff line change 12
12
!/README*
13
13
!/LICENSE*
14
14
!/CHANGELOG*
15
+ {{#if lockfile}}
16
+ package-lock.json
17
+ {{/if}}
15
18
{{#each ignorePaths}}
16
19
{{.}}
17
20
{{/each}}
Original file line number Diff line number Diff line change
1
+ const t = require ( 'tap' )
2
+ const setup = require ( '../setup.js' )
3
+
4
+ t . test ( 'lockfile' , async ( t ) => {
5
+ const s = await setup ( t , {
6
+ package : {
7
+ templateOSS : {
8
+ lockfile : true ,
9
+ } ,
10
+ } ,
11
+ } )
12
+ await s . apply ( )
13
+ const gitignore = await s . readFile ( '.gitignore' )
14
+ t . ok ( gitignore . includes ( 'package-lock.json' ) )
15
+
16
+ const npmrc = await s . readFile ( '.npmrc' )
17
+ t . ok ( npmrc . includes ( 'package-lock=true' ) )
18
+ } )
19
+
20
+ t . test ( 'no lockfile by default' , async ( t ) => {
21
+ const s = await setup ( t )
22
+ await s . apply ( )
23
+ const gitignore = await s . readFile ( '.gitignore' )
24
+ t . ok ( ! gitignore . includes ( 'package-lock.json' ) )
25
+
26
+ const npmrc = await s . readFile ( '.npmrc' )
27
+ t . ok ( npmrc . includes ( 'package-lock=false' ) )
28
+ } )
You can’t perform that action at this time.
0 commit comments