From 231f12f88120dc868b7bcbfcbd27f74d00f8ffaa Mon Sep 17 00:00:00 2001 From: Jordan Oroshiba Date: Fri, 29 Jun 2018 15:57:16 -0500 Subject: Adds support for named job flags (#196) * Adds support for named job flags * Add actual test function --- test/getOptions.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'test') diff --git a/test/getOptions.js b/test/getOptions.js index dd70a9b..d73b79c 100644 --- a/test/getOptions.js +++ b/test/getOptions.js @@ -116,6 +116,9 @@ describe("getOptions", function(){ it ("should set paralell if env var set", function(done){ testParallel(getOptions, done); }); + it ("should set flag_name if it exists", function(done) { + testFlagName(getOptions, done); + }); it ("should set service_name if it exists", function(done){ testServiceName(getOptions, done); }); @@ -242,6 +245,15 @@ var testParallel = function(sut, done){ }); }; +var testFlagName = function(sut, done){ + process.env.COVERALLS_FLAG_NAME = 'test flag'; + + sut(function(err, options){ + options.flag_name.should.equal('test flag'); + done(); + }); +}; + var testRepoTokenDetection = function(sut, done) { var fs = require('fs'); var path = require('path'); -- cgit v1.2.3