Skip to content
This repository was archived by the owner on Aug 11, 2021. It is now read-only.

Commit 62db5e4

Browse files
committed
standard: fix formatting
1 parent c7b326e commit 62db5e4

File tree

2 files changed

+61
-61
lines changed

2 files changed

+61
-61
lines changed

index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -408,8 +408,8 @@ function makeEnv (data, opts, prefix, env) {
408408
} else {
409409
env[envKey] = String(data[i])
410410
env[envKey] = env[envKey].indexOf('\n') !== -1
411-
? JSON.stringify(env[envKey])
412-
: env[envKey]
411+
? JSON.stringify(env[envKey])
412+
: env[envKey]
413413
}
414414
}
415415
}
@@ -436,8 +436,8 @@ function makeEnv (data, opts, prefix, env) {
436436
else if (typeof value !== 'string') value = JSON.stringify(value)
437437

438438
value = value.indexOf('\n') !== -1
439-
? JSON.stringify(value)
440-
: value
439+
? JSON.stringify(value)
440+
: value
441441
i = i.replace(/^_+/, '')
442442
var k
443443
if (i.indexOf(namePref) === 0) {

test/index.js

Lines changed: 57 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -100,20 +100,20 @@ test('runs scripts from .hooks directory even if no script is present in package
100100
dir,
101101
config: {}
102102
})
103-
.then(() => {
104-
t.ok(
105-
verbose.calledWithMatch(
106-
'lifecycle',
107-
'undefined~postinstall:',
108-
'stdout',
109-
'ran hook'
110-
),
111-
'ran postinstall hook'
112-
)
113-
114-
t.end()
115-
})
116-
.catch(t.end)
103+
.then(() => {
104+
t.ok(
105+
verbose.calledWithMatch(
106+
'lifecycle',
107+
'undefined~postinstall:',
108+
'stdout',
109+
'ran hook'
110+
),
111+
'ran postinstall hook'
112+
)
113+
114+
t.end()
115+
})
116+
.catch(t.end)
117117
})
118118

119119
test("reports child's output", function (t) {
@@ -142,47 +142,47 @@ test("reports child's output", function (t) {
142142
dir,
143143
config: {}
144144
})
145-
.then(() => {
146-
t.ok(
147-
verbose.calledWithMatch(
148-
'lifecycle',
149-
'undefined~postinstall:',
150-
'stdout',
151-
'line 1'
152-
),
153-
'stdout reported'
154-
)
155-
t.ok(
156-
verbose.calledWithMatch(
157-
'lifecycle',
158-
'undefined~postinstall:',
159-
'stdout',
160-
'line 2'
161-
),
162-
'stdout reported'
163-
)
164-
t.ok(
165-
verbose.calledWithMatch(
166-
'lifecycle',
167-
'undefined~postinstall:',
168-
'stderr',
169-
'some error'
170-
),
171-
'stderr reported'
172-
)
173-
t.ok(
174-
silly.calledWithMatch(
175-
'lifecycle',
176-
'undefined~postinstall:',
177-
'Returned: code:',
178-
0,
179-
' signal:',
180-
null
181-
),
182-
'exit code reported'
183-
)
184-
185-
t.end()
186-
})
187-
.catch(t.end)
145+
.then(() => {
146+
t.ok(
147+
verbose.calledWithMatch(
148+
'lifecycle',
149+
'undefined~postinstall:',
150+
'stdout',
151+
'line 1'
152+
),
153+
'stdout reported'
154+
)
155+
t.ok(
156+
verbose.calledWithMatch(
157+
'lifecycle',
158+
'undefined~postinstall:',
159+
'stdout',
160+
'line 2'
161+
),
162+
'stdout reported'
163+
)
164+
t.ok(
165+
verbose.calledWithMatch(
166+
'lifecycle',
167+
'undefined~postinstall:',
168+
'stderr',
169+
'some error'
170+
),
171+
'stderr reported'
172+
)
173+
t.ok(
174+
silly.calledWithMatch(
175+
'lifecycle',
176+
'undefined~postinstall:',
177+
'Returned: code:',
178+
0,
179+
' signal:',
180+
null
181+
),
182+
'exit code reported'
183+
)
184+
185+
t.end()
186+
})
187+
.catch(t.end)
188188
})

0 commit comments

Comments
 (0)