aboutsummaryrefslogtreecommitdiff
path: root/node_modules/ava/lib/runner.js
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2017-12-27 19:33:54 +0100
committerFlorian Dold <florian.dold@gmail.com>2017-12-27 19:34:16 +0100
commit0e6de2c31dbf8c21277481f112e99c52b913940f (patch)
tree91789032de3b8eec9d789acd1323f25fc5d08422 /node_modules/ava/lib/runner.js
parentceda0da31ad542c598c68146ae0712ca03df3d71 (diff)
node_modules
Diffstat (limited to 'node_modules/ava/lib/runner.js')
-rw-r--r--node_modules/ava/lib/runner.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/node_modules/ava/lib/runner.js b/node_modules/ava/lib/runner.js
index bda2132fd..eb02dde45 100644
--- a/node_modules/ava/lib/runner.js
+++ b/node_modules/ava/lib/runner.js
@@ -52,6 +52,7 @@ class Runner extends EventEmitter {
this.projectDir = options.projectDir;
this.serial = options.serial;
this.updateSnapshots = options.updateSnapshots;
+ this.snapshotDir = options.snapshotDir;
this.hasStarted = false;
this.results = [];
@@ -112,7 +113,7 @@ class Runner extends EventEmitter {
}
if (metadata.type === 'test' && this.match.length > 0) {
- metadata.exclusive = title !== null && matcher([title], this.match).length === 1;
+ metadata.exclusive = matcher([title || ''], this.match).length === 1;
}
const validationError = validateTest(title, fn, metadata);
@@ -130,6 +131,7 @@ class Runner extends EventEmitter {
addTestResult(result) {
const test = result.result;
const props = {
+ logs: test.logs,
duration: test.duration,
title: test.title,
error: result.reason,
@@ -183,6 +185,8 @@ class Runner extends EventEmitter {
compareTestSnapshot(options) {
if (!this.snapshots) {
this.snapshots = snapshotManager.load({
+ file: this.file,
+ fixedLocation: this.snapshotDir,
name: path.basename(this.file),
projectDir: this.projectDir,
relFile: path.relative(this.projectDir, this.file),
@@ -219,6 +223,7 @@ class Runner extends EventEmitter {
});
return Bluebird.try(() => this.tests.build().run());
}
+
attributeLeakedError(err) {
return this.tests.attributeLeakedError(err);
}