18f-pages-server
Advanced tools
Comparing version 0.3.1 to 0.3.2
@@ -164,3 +164,3 @@ 'use strict'; | ||
branchRegexp = new RegExp('refs/heads/(' + branchPattern + ')'); | ||
branchRegexp = new RegExp('refs/heads/(' + branchPattern + ')$'); | ||
@@ -167,0 +167,0 @@ handler = function(info) { |
{ | ||
"name": "18f-pages-server", | ||
"version": "0.3.1", | ||
"version": "0.3.2", | ||
"description": "Static website publishing server for 18F Pages", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -285,2 +285,22 @@ 'use strict'; | ||
it('should match the branch exactly, not just a prefix', function() { | ||
var handler = SiteBuilder.makeBuilderListener(webhook, builderConfig), | ||
payload = JSON.parse(JSON.stringify(incomingPayload)), | ||
builder; | ||
payload.ref = 'refs/heads/18f-pages-internal'; | ||
captureLogs(); | ||
builder = handler(payload); | ||
if (builder) { | ||
return builder.then(function() { | ||
return Promise.reject(new Error('the handler should not have ' + | ||
'matched a longer branch name that contains the target branch ' + | ||
'name as a prefix')); | ||
}) | ||
.catch(restoreLogs); | ||
} | ||
return restoreLogs(); | ||
}); | ||
it('should create a builder that builds the site', function() { | ||
@@ -287,0 +307,0 @@ var handler = SiteBuilder.makeBuilderListener(webhook, builderConfig); |
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
128634
2307