From af0534c1044abc4a9527295077c2bb701ba9bd5c Mon Sep 17 00:00:00 2001 From: Benjamin Pannell Date: Wed, 22 Apr 2015 11:56:31 +0200 Subject: [PATCH] Skip connection failure test on Travis (always connects) --- test/Core.js | 11 +++++++---- test/Core.js.map | 2 +- test/Core.ts | 10 ++++++---- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/test/Core.js b/test/Core.js index ae109de..f2ff5a0 100644 --- a/test/Core.js +++ b/test/Core.js @@ -85,10 +85,13 @@ describe("Core", function () { }); describe("connect", function () { var core; - it("should return a rejection if the connection fails", function () { - core = new Iridium.Core("mongodb://0.0.0.0/test"); - return chai.expect(core.connect()).to.be.rejected; - }); + if (!process.env.CI) + it("should return a rejection if the connection fails", function () { + core = new Iridium.Core("mongodb://0.0.0.0/test"); + return chai.expect(core.connect()).to.be.rejected; + }); + else + it.skip("should return a rejection if the connection fails"); it("should open a connection to the correct database and return the core", function () { core = new Iridium.Core("mongodb://localhost/test"); return chai.expect(core.connect()).to.eventually.exist.and.equal(core); diff --git a/test/Core.js.map b/test/Core.js.map index 0fed20b..960afea 100644 --- a/test/Core.js.map +++ b/test/Core.js.map @@ -1 +1 @@ -{"version":3,"file":"Core.js","sourceRoot":"","sources":["Core.ts"],"names":["InheritedCore","InheritedCore.constructor","InheritedCoreWithCustomConstructor","InheritedCoreWithCustomConstructor.constructor"],"mappings":";;;;;;AACA,AADA,4CAA4C;AAC5C,IAAO,OAAO,WAAW,UAAU,CAAC,CAAC;AAErC,IAAM,aAAa;IAASA,UAAtBA,aAAaA,UAAqBA;IAAxCA,SAAMA,aAAaA;QAASC,8BAAYA;QACpCA,cAASA,GAAGA,EAAEA,CAACA;IACnBA,CAACA;IAADD,oBAACA;AAADA,CAACA,AAFD,EAA4B,OAAO,CAAC,IAAI,EAEvC;AAED,IAAM,kCAAkC;IAASE,UAA3CA,kCAAkCA,UAAqBA;IACzDA,SADEA,kCAAkCA;QAEhCC,kBAAMA,0BAA0BA,CAACA,CAACA;IAC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CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,aAAa,EAAC;QACnB,EAAE,CAAC,yCAAyC,EAAC;YACzC,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC;YACpC,IAAI,CAAC,MAAM,CAAC,IAAI,aAAa,CAAC,0BAA0B,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACjG,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,uDAAuD,EAAC;YACvD,IAAI,IAAI,GAAG,IAAI,aAAa,CAAC;gBACzB,QAAQ,EAAE,MAAM;aACnB,CAAC,CAAC;YAEH,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,0BAA0B,CAAC,CAAC;QAC/D,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,kDAAkD,EAAC;YAClD,IAAI,IAAI,GAAG,IAAI,aAAa,CAAC;gBACzB,QAAQ,EAAE,MAAM;aACnB,CAAC,CAAC;YAEH,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QAC7C,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,oCAAoC,EAAC;YACpC,IAAI,IAAI,GAAG,IAAI,kCAAkC,EAAE,CAAC;YACpD,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,0BAA0B,CAAC,CAAC;QAC/D,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"} \ No newline at end of file +{"version":3,"file":"Core.js","sourceRoot":"","sources":["Core.ts"],"names":["InheritedCore","InheritedCore.constructor","InheritedCoreWithCustomConstructor","InheritedCoreWithCustomConstructor.const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AAC,CAAC;YAEH,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QAC7C,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,oCAAoC,EAAC;YACpC,IAAI,IAAI,GAAG,IAAI,kCAAkC,EAAE,CAAC;YACpD,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,0BAA0B,CAAC,CAAC;QAC/D,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/test/Core.ts b/test/Core.ts index dc7d273..531d6a8 100644 --- a/test/Core.ts +++ b/test/Core.ts @@ -89,10 +89,12 @@ describe("Core",() => { describe("connect",() => { var core: Iridium.Core; - it("should return a rejection if the connection fails",() => { - core = new Iridium.Core("mongodb://0.0.0.0/test"); - return chai.expect(core.connect()).to.be.rejected; - }); + if (!process.env.CI) + it("should return a rejection if the connection fails",() => { + core = new Iridium.Core("mongodb://0.0.0.0/test"); + return chai.expect(core.connect()).to.be.rejected; + }); + else it.skip("should return a rejection if the connection fails"); it("should open a connection to the correct database and return the core",() => { core = new Iridium.Core("mongodb://localhost/test");