chore: cleanup Mocha test output

pull/241/head
Romain 3 years ago
parent 3238cd9232
commit 61dc0c588d

@ -2,3 +2,5 @@ recursive: true
require:
- test/helpers.js
- test/log.js
reporter: list
parallel: false

@ -1,11 +1,22 @@
const path = require('path')
const process = require('process')
const should = require('should/as-function')
const sinon = require('sinon')
const options = require('../../bin/options.js')
const BASE_ARGS = ['--input', 'photos', '--output', 'website']
describe('options', function () {
before(() => {
// all other modules use debug() which is already captured during tests
// but options are parsed before log management so they use console.error
sinon.stub(console, 'error')
})
after(() => {
console.error.restore()
})
describe('parsing', () => {
it('parses a single basic option', () => {
const opts = options.get(BASE_ARGS)

@ -49,7 +49,6 @@ describe('Full integration', function () {
// Reset the logger ASAP to print the test status
console.log = console.logOld
// Check for any errors
console.log(err)
should(err).eql(null)
debug.assertNotContains('thumbsup:error')
// Check the contents of the output folder

@ -15,6 +15,8 @@ function outputName (output) {
}
describe('Album', function () {
this.slow(200)
describe('previews', function () {
it('picks the first 10 photos by default', function () {
const album = new Album({ files: arrayOfFiles(100) })

Loading…
Cancel
Save