1
0
mirror of synced 2025-12-23 21:07:12 -05:00

updating libapp in one script and tests

This commit is contained in:
Grace Park
2021-06-23 10:46:10 -07:00
parent 6db9920658
commit 6c0b43a4bb
5 changed files with 13 additions and 13 deletions

View File

@@ -126,7 +126,7 @@ describe('does not render survey prompt or contribution button', () => {
describe('JS and CSS assets', () => {
it('returns the expected CSS file > 2.18', async () => {
const result = await supertest(app)
const result = await supertest(app())
.get('/enterprise/2.18/dist/index.css')
.set('Referrer', '/en/enterprise/2.18')
@@ -136,7 +136,7 @@ describe('JS and CSS assets', () => {
})
it('returns the expected CSS file', async () => {
const result = await supertest(app)
const result = await supertest(app())
.get('/stylesheets/index.css')
.set('Referrer', '/en/enterprise/2.13')
@@ -146,7 +146,7 @@ describe('JS and CSS assets', () => {
})
it('returns the expected JS file > 2.18', async () => {
const result = await supertest(app)
const result = await supertest(app())
.get('/enterprise/2.18/dist/index.js')
.set('Referrer', '/en/enterprise/2.18')
@@ -156,7 +156,7 @@ describe('JS and CSS assets', () => {
})
it('returns the expected JS file', async () => {
const result = await supertest(app)
const result = await supertest(app())
.get('/javascripts/index.js')
.set('Referrer', '/en/enterprise/2.13')
@@ -166,7 +166,7 @@ describe('JS and CSS assets', () => {
})
it('returns the expected image', async () => {
const result = await supertest(app)
const result = await supertest(app())
.get('/assets/images/octicons/hamburger.svg')
.set('Referrer', '/en/enterprise/2.17')
@@ -176,7 +176,7 @@ describe('JS and CSS assets', () => {
})
it('returns the expected node_modules', async () => {
const result = await supertest(app)
const result = await supertest(app())
.get('/node_modules/algoliasearch/dist/algoliasearch.min.js')
.set('Referrer', '/en/enterprise/2.17')
@@ -186,7 +186,7 @@ describe('JS and CSS assets', () => {
})
it('returns the expected favicon', async () => {
const result = await supertest(app)
const result = await supertest(app())
.get('/assets/images/site/favicon.svg')
.set('Referrer', '/en/enterprise/2.18')
@@ -196,7 +196,7 @@ describe('JS and CSS assets', () => {
})
it('returns the expected CSS file ( <2.13 )', async () => {
const result = await supertest(app)
const result = await supertest(app())
.get('/assets/stylesheets/application.css')
.set('Referrer', '/en/enterprise/2.12')
@@ -206,7 +206,7 @@ describe('JS and CSS assets', () => {
})
it('ignores invalid paths', async () => {
const result = await supertest(app)
const result = await supertest(app())
.get('/pizza/index.css')
.set('Referrer', '/en/enterprise/2.13')

View File

@@ -103,7 +103,7 @@ describe('redirects', () => {
})
test('are redirected for HEAD requests (not just GET requests)', async () => {
const res = await supertest(app).head('/articles/closing-issues-via-commit-messages/')
const res = await supertest(app()).head('/articles/closing-issues-via-commit-messages/')
expect(res.statusCode).toBe(301)
expect(res.headers.location).toBe('/articles/closing-issues-via-commit-messages')
})