Skip to content

Commit cae9287

Browse files
committed
Rename variables
1 parent 40256bc commit cae9287

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

example/unnamed-test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
var tapSummary = require('..')
21
var fs = require('fs')
2+
var tapSummary = require('..')
33

44
fs.createReadStream(__dirname + '/unnamed-test.tap')
55
.pipe(tapSummary())

test/reporter.js

+6-7
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
var test = require('tape')
2-
var summarize = require('..')
2+
var reporter = require('..')
33
var fs = require('fs')
44
var path = require('path')
55
var fixtures = path.resolve.bind(path, __dirname, 'fixtures')
66
var concat = require('concat-stream')
77

88
test('summary ansi', function (t) {
99
fs.createReadStream(fixtures('summary.tap'))
10-
.pipe(summarize({ duration: false, progress: false }))
10+
.pipe(reporter({ duration: false, progress: false }))
1111
.pipe(concat({ encoding: 'string' }, function (s) {
1212
t.equal(s, fs.readFileSync(fixtures('summary.ansi.expected'), 'utf8'))
1313
t.end()
@@ -16,22 +16,21 @@ test('summary ansi', function (t) {
1616

1717
test('summary no ansi', function (t) {
1818
fs.createReadStream(fixtures('summary.tap'))
19-
.pipe(summarize({ duration: false, progress: false, ansi: false }))
19+
.pipe(reporter({ duration: false, progress: false, ansi: false }))
2020
.pipe(concat({ encoding: 'string' }, function (s) {
2121
t.equal(s, fs.readFileSync(fixtures('summary.noansi.expected'), 'utf8'))
2222
t.end()
2323
}))
2424
})
2525

2626
test('fail', function (t) {
27-
var formatter = new summarize.Formatter({ duration: false, progress: false })
28-
formatter.prettifyError = function (assertion) {
27+
reporter.Formatter.prototype.prettifyError = function (assertion) {
2928
var lines = assertion.error.raw.split('\n')
3029
lines.pop()
3130
return lines.join('\n')
3231
}
3332
fs.createReadStream(fixtures('fail.tap'))
34-
.pipe(summarize.reporter(formatter))
33+
.pipe(reporter({ duration: false, progress: false }))
3534
.pipe(concat({ encoding: 'string' }, function (s) {
3635
t.equal(s, fs.readFileSync(fixtures('fail.expected'), 'utf8'))
3736
t.end()
@@ -40,7 +39,7 @@ test('fail', function (t) {
4039

4140
test('comment', function (t) {
4241
fs.createReadStream(fixtures('comment.tap'))
43-
.pipe(summarize({ duration: false, progress: false }))
42+
.pipe(reporter({ duration: false, progress: false }))
4443
.pipe(concat({ encoding: 'string' }, function (s) {
4544
t.equal(s, fs.readFileSync(fixtures('comment.expected'), 'utf8'))
4645
t.end()

0 commit comments

Comments
 (0)