Skip to content

Commit

Permalink
test: get results of tests in some cases
Browse files Browse the repository at this point in the history
  • Loading branch information
jimlambie committed Nov 9, 2018
1 parent 3f5344f commit b126e98
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
31 changes: 16 additions & 15 deletions test/acceptance/multi-domain.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,15 +134,16 @@ describe('Multi-domain', function () {
test: `${cdnUrl}/sample-image-recipe/test.jpg`
}).then(match => {
match.should.eql(true)

console.log('match :', match);
return help.imagesEqual({
base: images['localhost'],
test: `${help.proxyUrl}/sample-image-recipe/test.jpg?mockdomain=unknowndomain.com`
}).then(match => {
console.log('match :', match);
match.should.eql(true)
})
})
}).timeout(5000)
}).timeout(10000)

it('should retrieve a remote image regardless of whether the domain is configured', () => {
return help.imagesEqual({
Expand All @@ -158,7 +159,7 @@ describe('Multi-domain', function () {
match.should.eql(true)
})
})
}).timeout(5000)
}).timeout(10000)

describe('Caching', () => {
beforeEach(() => {
Expand Down Expand Up @@ -204,7 +205,7 @@ describe('Multi-domain', function () {
})
}, 1000)
})
}).timeout(5000)
}).timeout(10000)
})
})

Expand Down Expand Up @@ -269,7 +270,7 @@ describe('Multi-domain', function () {
match.should.eql(true)
})
})
}).timeout(5000)
}).timeout(10000)

it('should retrieve a local image from the path specified by the domain config', () => {
config.set('images.directory.enabled', true, 'localhost')
Expand All @@ -291,7 +292,7 @@ describe('Multi-domain', function () {
}).then(match => {
match.should.eql(true)
})
}).timeout(5000)
}).timeout(10000)

it('should retrieve a remote image from the path specified by the domain config', () => {
return help.imagesEqual({
Expand All @@ -307,7 +308,7 @@ describe('Multi-domain', function () {
match.should.eql(true)
})
})
}).timeout(5000)
}).timeout(10000)

it('should retrieve a remote CSS file from the path specified by the domain config', () => {
return help.filesEqual({
Expand All @@ -323,7 +324,7 @@ describe('Multi-domain', function () {
match.should.eql(true)
})
})
}).timeout(5000)
}).timeout(10000)

it('should retrieve a remote TXT file from the path specified by the domain config', () => {
return help.filesEqual({
Expand All @@ -339,7 +340,7 @@ describe('Multi-domain', function () {
match.should.eql(true)
})
})
}).timeout(5000)
}).timeout(10000)

it.skip('should retrieve a remote JS file from the path specified by the domain config', () => {
return help.filesEqual({
Expand All @@ -355,7 +356,7 @@ describe('Multi-domain', function () {
match.should.eql(true)
})
})
}).timeout(5000)
}).timeout(10000)

it('should use the images.allowFullURL setting defined at domain level to determine whether or not a request with a full remote URL will be served', done => {
config.set('images.remote.allowFullURL', true, 'localhost')
Expand All @@ -380,7 +381,7 @@ describe('Multi-domain', function () {
done()
})
})
}).timeout(5000)
}).timeout(10000)

it('should use the assets.allowFullURL setting defined at domain level to determine whether or not a CSS request with a full remote URL will be served', done => {
config.set('assets.remote.allowFullURL', true, 'localhost')
Expand All @@ -405,7 +406,7 @@ describe('Multi-domain', function () {
done()
})
})
}).timeout(5000)
}).timeout(10000)

it('should use the assets.allowFullURL setting defined at domain level to determine whether or not a JS request with a full remote URL will be served', done => {
config.set('assets.remote.allowFullURL', true, 'localhost')
Expand All @@ -430,7 +431,7 @@ describe('Multi-domain', function () {
done()
})
})
}).timeout(5000)
}).timeout(10000)

it('should use the assets.allowFullURL setting defined at domain level to determine whether or not a default request with a full remote URL will be served', done => {
config.set('assets.remote.allowFullURL', true, 'localhost')
Expand All @@ -455,7 +456,7 @@ describe('Multi-domain', function () {
done()
})
})
}).timeout(5000)
}).timeout(10000)

describe('internal domain management', () => {
it('should return 404 if not configured', done => {
Expand Down Expand Up @@ -827,7 +828,7 @@ describe('Multi-domain', function () {
})
}, 1000)
})
}).timeout(5000)
}).timeout(10000)
})
})
})
3 changes: 1 addition & 2 deletions test/acceptance/status.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,9 @@ describe('Status', function () {
.expect('content-type', 'application/json')
.expect(200)
.end((err, res) => {
console.log('res :', res)

console.log('nock :', nock)
let statusResponse = res.body

statusResponse.status.status.should.eql(200)
done()
})
Expand Down

0 comments on commit b126e98

Please sign in to comment.