hapiest-cloudfront-url
Advanced tools
Comparing version 0.0.4 to 0.0.5
@@ -26,2 +26,6 @@ 'use strict'; | ||
getCloudfrontDomainName() { | ||
return this._cloudfrontDomainName; | ||
} | ||
/** | ||
@@ -28,0 +32,0 @@ * Returns true if the URL is from an origin in the Cloudfront distribution |
{ | ||
"name": "hapiest-cloudfront-url", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"description": "Maps origin URLs to an AWS Cloudfront distribution URL", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -7,3 +7,19 @@ 'use strict'; | ||
describe('CloudfrontUrlService', function() { | ||
describe('getCloudfrontDomainName', function() { | ||
it('Should return the Cloudfront domain name', function() { | ||
const cfUrlService = CloudfrontUrlServiceFactory.create({ | ||
cloudfrontDomainName: 'dafjlsavc13asd.cloudfront.net', | ||
enabled: true, | ||
origins: [{host: 'my-bucket.s3.amazonaws.com', path: 'public'}] | ||
}); | ||
const cfDomainName = cfUrlService.getCloudfrontDomainName(); | ||
cfDomainName.should.eql('dafjlsavc13asd.cloudfront.net'); | ||
}); | ||
}); | ||
describe('convertUrl', function() { | ||
@@ -10,0 +26,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
385
40595
19