From 2f15958d32fa51d46f87dc155892770d27abb0fe Mon Sep 17 00:00:00 2001 From: Dan Quirk Date: Fri, 10 Jul 2015 18:08:19 -0700 Subject: [PATCH] Use new mocha-fivemat-progress-reporter by default instead of dot reporter --- Jakefile.js | 2 +- package.json | 3 ++- src/harness/compilerRunner.ts | 12 +++++++----- src/harness/fourslashRunner.ts | 2 +- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/Jakefile.js b/Jakefile.js index 517f5e862d5..1c6dfa25e7b 100644 --- a/Jakefile.js +++ b/Jakefile.js @@ -562,7 +562,7 @@ task("runtests", ["tests", builtLocalDirectory], function() { colors = process.env.colors || process.env.color colors = colors ? ' --no-colors ' : ' --colors '; tests = tests ? ' -g ' + tests : ''; - reporter = process.env.reporter || process.env.r || 'dot'; + reporter = process.env.reporter || process.env.r || 'mocha-fivemat-progress-reporter'; // timeout normally isn't necessary but Travis-CI has been timing out on compiler baselines occasionally // default timeout is 2sec which really should be enough, but maybe we just need a small amount longer var cmd = host + " -R " + reporter + tests + colors + ' -t ' + testTimeout + ' ' + run; diff --git a/package.json b/package.json index d6a8f538b78..9349efbd0ac 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,8 @@ "mocha": "latest", "chai": "latest", "browserify": "latest", - "istanbul": "latest" + "istanbul": "latest", + "mocha-fivemat-progress-reporter": "latest" }, "scripts": { "test": "jake runtests" diff --git a/src/harness/compilerRunner.ts b/src/harness/compilerRunner.ts index 1c8dccc6173..39d4b053956 100644 --- a/src/harness/compilerRunner.ts +++ b/src/harness/compilerRunner.ts @@ -10,6 +10,7 @@ const enum CompilerTestType { class CompilerBaselineRunner extends RunnerBase { private basePath = 'tests/cases'; + private testSuiteName: string; private errors: boolean; private emit: boolean; private decl: boolean; @@ -24,16 +25,17 @@ class CompilerBaselineRunner extends RunnerBase { this.decl = true; this.output = true; if (testType === CompilerTestType.Conformance) { - this.basePath += '/conformance'; + this.testSuiteName = 'conformance'; } else if (testType === CompilerTestType.Regressions) { - this.basePath += '/compiler'; + this.testSuiteName = 'compiler'; } else if (testType === CompilerTestType.Test262) { - this.basePath += '/test262'; + this.testSuiteName = 'test262'; } else { - this.basePath += '/compiler'; // default to this for historical reasons + this.testSuiteName = 'compiler'; // default to this for historical reasons } + this.basePath += '/' + this.testSuiteName; } public checkTestCodeOutput(fileName: string) { @@ -384,7 +386,7 @@ class CompilerBaselineRunner extends RunnerBase { } public initializeTests() { - describe('Compiler tests', () => { + describe(this.testSuiteName + ' tests', () => { describe("Setup compiler for compiler baselines", () => { var harnessCompiler = Harness.Compiler.getCompiler(); this.parseOptions(); diff --git a/src/harness/fourslashRunner.ts b/src/harness/fourslashRunner.ts index 9287f7361a5..37d55974612 100644 --- a/src/harness/fourslashRunner.ts +++ b/src/harness/fourslashRunner.ts @@ -35,7 +35,7 @@ class FourSlashRunner extends RunnerBase { this.tests = this.enumerateFiles(this.basePath, /\.ts/i, { recursive: false }); } - describe('Fourslash tests', () => { + describe(this.testSuiteName + ' tests', () => { this.tests.forEach((fn: string) => { describe(fn, () => { fn = ts.normalizeSlashes(fn);