@expressen/tallahassee
Advanced tools
Comparing version 2.4.0 to 2.5.0
@@ -20,3 +20,3 @@ "use strict"; | ||
function navigateTo(linkUrl, headers = {}) { | ||
function navigateTo(linkUrl, headers = {}, statusCode = 200) { | ||
const req = supertest(app).get(linkUrl); | ||
@@ -28,3 +28,3 @@ for (const key in headers) { | ||
.expect("Content-Type", /text\/html/i) | ||
.expect(200) | ||
.expect(statusCode) | ||
.then(load); | ||
@@ -31,0 +31,0 @@ } |
{ | ||
"name": "@expressen/tallahassee", | ||
"version": "2.4.0", | ||
"version": "2.5.0", | ||
"description": "Expressen client testing framework", | ||
@@ -41,3 +41,3 @@ "main": "index.js", | ||
"markdown-toc": "^1.2.0", | ||
"mocha": "^5.0.1", | ||
"mocha": "^5.0.2", | ||
"nock": "^9.2.3" | ||
@@ -44,0 +44,0 @@ }, |
@@ -43,2 +43,7 @@ Tallahassee | ||
}); | ||
it("unless you override status code", async () => { | ||
const browser = await Browser(app).navigateTo("/404", null, 404); | ||
expect(browser.document.getElementsByTagName("h1")[0].innerText).to.equal("Apocalyptic"); | ||
}); | ||
}); | ||
@@ -45,0 +50,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
36892
457
73