From 0e6de2c31dbf8c21277481f112e99c52b913940f Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Wed, 27 Dec 2017 19:33:54 +0100 Subject: node_modules --- node_modules/ava/lib/runner.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'node_modules/ava/lib/runner.js') 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); } -- cgit v1.2.3