Skip to content

Commit dfc67f6

Browse files
authored
Improve test error output (#153)
1 parent 4b829ee commit dfc67f6

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

test/upload_test_helpers.js

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,16 @@ import {assert} from 'chai'
1111
import {spawnSync} from 'child_process'
1212
import MiniCssExtractPlugin from 'mini-css-extract-plugin'
1313

14-
const S3_URL = `https://s3.dualstack.${s3Opts.AWS_REGION}.amazonaws.com/${s3Opts.AWS_BUCKET}/`,
15-
S3_ERROR_REGEX = /<Error>/,
16-
OUTPUT_FILE_NAME = 's3Test',
17-
OUTPUT_PATH = path.resolve(__dirname, '.tmp'),
18-
ENTRY_PATH = path.resolve(__dirname, 'fixtures/index.js'),
19-
createBuildFailError = (errors) => `Webpack Build Failed ${errors.map(JSON.stringify)}`
14+
const S3_URL = `https://s3.dualstack.${s3Opts.AWS_REGION}.amazonaws.com/${s3Opts.AWS_BUCKET}/`
15+
const S3_ERROR_REGEX = /<Error>/
16+
const OUTPUT_FILE_NAME = 's3Test'
17+
const OUTPUT_PATH = path.resolve(__dirname, '.tmp')
18+
const ENTRY_PATH = path.resolve(__dirname, 'fixtures/index.js')
19+
20+
const createBuildFailError = (errors) => [
21+
'Webpack Build Failed',
22+
...errors.map(e => e.stack),
23+
].join('\n')
2024

2125
var deleteFolderRecursive = function(path) {
2226
if (fs.existsSync(path)) {

0 commit comments

Comments
 (0)