Welcome to mirror list, hosted at ThFree Co, Russian Federation.

config.js.test.cjs « lib « test « tap-snapshots - github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: b5acbb0af94c53ff7f3dd25363a2634b7c5e237b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
/* IMPORTANT
 * This snapshot file is auto-generated, but designed for humans.
 * It should be checked into source control and tracked carefully.
 * Re-generate by setting TAP_SNAPSHOT=1 and running tests.
 * Make sure to inspect the output below.  Do not ignore changes!
 */
'use strict'
exports[`test/lib/config.js TAP config edit --location=global > should write global config file 1`] = `
;;;;
; npm globalconfig file: /etc/npmrc
; this is a simple ini-formatted file
; lines that start with semi-colons are comments
; run \`npm help 7 config\` for documentation of the various options
;
; Configs like \`@scope:registry\` map a scope to a given registry url.
;
; Configs like \`//<hostname>/:_authToken\` are auth that is restricted
; to the registry host specified.

init.author.name=Foo

;;;;
; all available options shown below with default values
;;;;


; init-author-name=
; init-version=1.0.0
; init.author.name=
; init.version=1.0.0

`

exports[`test/lib/config.js TAP config edit > should write config file 1`] = `
;;;;
; npm userconfig file: ~/.npmrc
; this is a simple ini-formatted file
; lines that start with semi-colons are comments
; run \`npm help 7 config\` for documentation of the various options
;
; Configs like \`@scope:registry\` map a scope to a given registry url.
;
; Configs like \`//<hostname>/:_authToken\` are auth that is restricted
; to the registry host specified.

//registry.npmjs.org/:_authToken=0000000
init.author.name=Foo
sign-git-commit=true

;;;;
; all available options shown below with default values
;;;;


; init-author-name=
; init-version=1.0.0
; init.author.name=
; init.version=1.0.0

`

exports[`test/lib/config.js TAP config edit > should write config file 2`] = `
;;;;
; npm userconfig file: ~/.npmrc
; this is a simple ini-formatted file
; lines that start with semi-colons are comments
; run \`npm help 7 config\` for documentation of the various options
;
; Configs like \`@scope:registry\` map a scope to a given registry url.
;
; Configs like \`//<hostname>/:_authToken\` are auth that is restricted
; to the registry host specified.



;;;;
; all available options shown below with default values
;;;;


; init-author-name=
; init-version=1.0.0
; init.author.name=
; init.version=1.0.0

`

exports[`test/lib/config.js TAP config get no args > should list configs on config get no args 1`] = `
; "cli" config from command line options

cat = true 
chai = true 
dog = true 
editor = "vi" 
json = false 
location = "user" 
long = false 

; node bin location = /path/to/node
; cwd = {CWD}
; HOME = ~/
; Run \`npm config ls -l\` to show all defaults.
`

exports[`test/lib/config.js TAP config list --long > should list all configs 1`] = `
; "default" config from default values

init-author-name = "" 
init-version = "1.0.0" 
init.author.name = "" 
init.version = "1.0.0" 

; "cli" config from command line options

cat = true 
chai = true 
dog = true 
editor = "vi" 
json = false 
location = "user" 
long = true
`

exports[`test/lib/config.js TAP config list > should list configs 1`] = `
; "cli" config from command line options

cat = true 
chai = true 
dog = true 
editor = "vi" 
json = false 
location = "user" 
long = false 

; node bin location = /path/to/node
; cwd = {CWD}
; HOME = ~/
; Run \`npm config ls -l\` to show all defaults.
`

exports[`test/lib/config.js TAP config list overrides > should list overridden configs 1`] = `
; "cli" config from command line options

cat = true 
chai = true 
dog = true 
editor = "vi" 
init.author.name = "Bar" 
json = false 
location = "user" 
long = false 

; "user" config from ~/.npmrc

; //private-reg.npmjs.org/:_authThoken = (protected) ; overridden by cli
; init.author.name = "Foo" ; overridden by cli

; node bin location = /path/to/node
; cwd = {CWD}
; HOME = ~/
; Run \`npm config ls -l\` to show all defaults.
`