aboutsummaryrefslogtreecommitdiff
path: root/node_modules/ava/lib/runner.js
diff options
context:
space:
mode:
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);
}