chore: move all testable code to <src>

pull/231/head
Romain 3 years ago
parent d5ebd160e5
commit fd1a0069a5

@ -1,7 +1,6 @@
all: true all: true
include: include:
- src/** - src/**
- bin/**
reporter: reporter:
- html - html
- text-summary - text-summary

@ -3,9 +3,9 @@
const fs = require('fs-extra') const fs = require('fs-extra')
const moment = require('moment') const moment = require('moment')
const Analytics = require('./analytics') const Analytics = require('./analytics')
const dependencies = require('./dependencies') const dependencies = require('../src/cli/dependencies')
const messages = require('./messages') const messages = require('../src/cli/messages')
const options = require('./options') const options = require('../src/cli/options')
console.log('') console.log('')
@ -85,7 +85,7 @@ function exit (code) {
setTimeout(() => process.exit(code), 10) setTimeout(() => process.exit(code), 10)
} }
// Cound the total number of nested albums // Count the total number of nested albums
function countAlbums (total, album) { function countAlbums (total, album) {
return 1 + album.albums.reduce(countAlbums, total) return 1 + album.albums.reduce(countAlbums, total)
} }

@ -1,5 +1,5 @@
const warn = require('debug')('thumbsup:warn') const warn = require('debug')('thumbsup:warn')
const messages = require('../bin/messages') const messages = require('./cli/messages')
/* /*
Keeps track of which source files we failed to process Keeps track of which source files we failed to process

@ -1,5 +1,5 @@
const should = require('should/as-function') const should = require('should/as-function')
const messages = require('../../bin/messages.js') const messages = require('../../src/cli/messages.js')
describe('messages', function () { describe('messages', function () {
it('shows SUCCESS in a box', () => { it('shows SUCCESS in a box', () => {

@ -2,7 +2,7 @@ const path = require('path')
const process = require('process') const process = require('process')
const should = require('should/as-function') const should = require('should/as-function')
const sinon = require('sinon') const sinon = require('sinon')
const options = require('../../bin/options.js') const options = require('../../src/cli/options.js')
const BASE_ARGS = ['--input', 'photos', '--output', 'website'] const BASE_ARGS = ['--input', 'photos', '--output', 'website']

@ -3,7 +3,7 @@ const glob = require('glob')
const path = require('path') const path = require('path')
const should = require('should/as-function') const should = require('should/as-function')
const fixtures = require('../fixtures') const fixtures = require('../fixtures')
const options = require('../../bin/options') const options = require('../../src/cli/options')
const index = require('../../src/index') const index = require('../../src/index')
describe('Full integration', function () { describe('Full integration', function () {

Loading…
Cancel
Save