Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
Signed-off-by: Roberto Bianchi <[email protected]>
  • Loading branch information
rozzilla committed Dec 3, 2024
1 parent e856d39 commit b359705
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions test/prepare.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ test('Swagger source does not contain sourceMaps', async (t) => {

const includesSourceMap = res.payload.includes('sourceMappingURL')
t.assert.deepStrictEqual(includesSourceMap, false)
t.assert.deepStrictEqual(res.headers['content-type'], 'application/javascript; charset=UTF-8')
t.assert.deepStrictEqual(res.headers['content-type'], 'application/javascript; charset=utf-8')
})

test('Swagger css does not contain sourceMaps', async (t) => {
Expand All @@ -34,5 +34,5 @@ test('Swagger css does not contain sourceMaps', async (t) => {

const includesSourceMap = res.payload.includes('sourceMappingURL')
t.assert.deepStrictEqual(includesSourceMap, false)
t.assert.deepStrictEqual(res.headers['content-type'], 'text/css; charset=UTF-8')
t.assert.deepStrictEqual(res.headers['content-type'], 'text/css; charset=utf-8')
})
10 changes: 5 additions & 5 deletions test/route.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ test('/documentation/static/:file should send back the correct file', async (t)
url: '/documentation/static/'
})
t.assert.deepStrictEqual(typeof res.payload, 'string')
t.assert.deepStrictEqual(res.headers['content-type'], 'text/html; charset=UTF-8')
t.assert.deepStrictEqual(res.headers['content-type'], 'text/html; charset=utf-8')
t.assert.deepStrictEqual(
readFileSync(
resolve(__dirname, '..', 'static', 'index.html'),
Expand All @@ -322,7 +322,7 @@ test('/documentation/static/:file should send back the correct file', async (t)
url: '/documentation/static/oauth2-redirect.html'
})
t.assert.deepStrictEqual(typeof res.payload, 'string')
t.assert.deepStrictEqual(res.headers['content-type'], 'text/html; charset=UTF-8')
t.assert.deepStrictEqual(res.headers['content-type'], 'text/html; charset=utf-8')
t.assert.deepStrictEqual(
readFileSync(
resolve(__dirname, '..', 'static', 'oauth2-redirect.html'),
Expand All @@ -338,7 +338,7 @@ test('/documentation/static/:file should send back the correct file', async (t)
url: '/documentation/static/swagger-ui.css'
})
t.assert.deepStrictEqual(typeof res.payload, 'string')
t.assert.deepStrictEqual(res.headers['content-type'], 'text/css; charset=UTF-8')
t.assert.deepStrictEqual(res.headers['content-type'], 'text/css; charset=utf-8')
t.assert.deepStrictEqual(
readFileSync(
resolve(__dirname, '..', 'static', 'swagger-ui.css'),
Expand All @@ -354,7 +354,7 @@ test('/documentation/static/:file should send back the correct file', async (t)
url: '/documentation/static/swagger-ui-bundle.js'
})
t.assert.deepStrictEqual(typeof res.payload, 'string')
t.assert.deepStrictEqual(res.headers['content-type'], 'application/javascript; charset=UTF-8')
t.assert.deepStrictEqual(res.headers['content-type'], 'application/javascript; charset=utf-8')
t.assert.deepStrictEqual(
readFileSync(
resolve(__dirname, '..', 'static', 'swagger-ui-bundle.js'),
Expand All @@ -370,7 +370,7 @@ test('/documentation/static/:file should send back the correct file', async (t)
url: '/documentation/static/swagger-ui-standalone-preset.js'
})
t.assert.deepStrictEqual(typeof res.payload, 'string')
t.assert.deepStrictEqual(res.headers['content-type'], 'application/javascript; charset=UTF-8')
t.assert.deepStrictEqual(res.headers['content-type'], 'application/javascript; charset=utf-8')
t.assert.deepStrictEqual(
readFileSync(
resolve(__dirname, '..', 'static', 'swagger-ui-standalone-preset.js'),
Expand Down

0 comments on commit b359705

Please sign in to comment.