Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable output for single-file usage #390

Closed
mcollina opened this issue Jul 1, 2015 · 2 comments
Assignees
Labels
Milestone

Comments

@mcollina
Copy link
Contributor

@mcollina mcollina commented Jul 1, 2015

Can output: process.stdout be the the default if a script is run standalone? Basically if it is not run through the runner.

This does not produce any output:

'use strict'

var Code = require('code')
var Lab = require('lab')
var lab = exports.lab = Lab.script()

lab.test('returns true when 1 + 1 equals 2', function (done) {
  Code.expect(1+1).to.equal(3)
  done()
})

While this does:

'use strict'

var Code = require('code')
var Lab = require('lab')
var lab = exports.lab = Lab.script({ output: process.stdout })

lab.test('returns true when 1 + 1 equals 2', function (done) {
  Code.expect(1+1).to.equal(3)
  done()
})
@geek

This comment has been minimized.

Copy link
Member

@geek geek commented Jul 1, 2015

@mcollina yes! Great idea, will add an enhancement tag and get to work on this.

@geek geek added the feature label Jul 1, 2015
@mcollina

This comment has been minimized.

Copy link
Contributor Author

@mcollina mcollina commented Jul 1, 2015

👍

@geek geek self-assigned this Jul 1, 2015
@geek geek added this to the 10.6.0 milestone May 18, 2016
@cjihrig cjihrig closed this in #586 May 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.