Skip to content

Commit

Permalink
fix content-length check
Browse files Browse the repository at this point in the history
  • Loading branch information
runspired committed Nov 24, 2022
1 parent f0ab1fa commit 6c24bd1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 11 deletions.
1 change: 0 additions & 1 deletion .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,3 @@ runs:
lint-${{ github.head_ref }}
lint-master
lint-
12 changes: 4 additions & 8 deletions tests/request/tests/integration/response-currying-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ module('RequestManager | Response Currying', function () {
// @ts-expect-error
serialized.headers = (serialized.headers as [string, string][]).filter((v) => {
// don't test headers that change every time
return !['date', 'etag', 'last-modified'].includes(v[0]);
return !['content-length', 'date', 'etag', 'last-modified'].includes(v[0]);
});
// @ts-expect-error port is unstable in CI
delete serialized.url;
Expand All @@ -40,7 +40,6 @@ module('RequestManager | Response Currying', function () {
headers: [
['accept-ranges', 'bytes'],
['cache-control', 'public, max-age=0'],
['content-length', '57'],
['content-type', 'application/json; charset=UTF-8'],
// ['date', 'Wed, 23 Nov 2022 05:17:11 GMT'],
// ['etag', 'W/"39-1849db13af9"'],
Expand Down Expand Up @@ -100,7 +99,7 @@ module('RequestManager | Response Currying', function () {
// @ts-expect-error
serialized.headers = (serialized.headers as [string, string][]).filter((v) => {
// don't test headers that change every time
return !['date', 'etag', 'last-modified'].includes(v[0]);
return !['content-length', 'date', 'etag', 'last-modified'].includes(v[0]);
});
// @ts-expect-error port is unstable in CI
delete serialized.url;
Expand All @@ -113,7 +112,6 @@ module('RequestManager | Response Currying', function () {
headers: [
['accept-ranges', 'bytes'],
['cache-control', 'public, max-age=0'],
['content-length', '57'],
['content-type', 'application/json; charset=UTF-8'],
// ['date', 'Wed, 23 Nov 2022 05:17:11 GMT'],
// ['etag', 'W/"39-1849db13af9"'],
Expand Down Expand Up @@ -155,7 +153,7 @@ module('RequestManager | Response Currying', function () {
// @ts-expect-error
serialized.headers = (serialized.headers as [string, string][]).filter((v) => {
// don't test headers that change every time
return !['date', 'etag', 'last-modified'].includes(v[0]);
return !['content-length', 'date', 'etag', 'last-modified'].includes(v[0]);
});
// @ts-expect-error port is unstable in CI
delete serialized.url;
Expand All @@ -168,7 +166,6 @@ module('RequestManager | Response Currying', function () {
headers: [
['accept-ranges', 'bytes'],
['cache-control', 'public, max-age=0'],
['content-length', '57'],
['content-type', 'application/json; charset=UTF-8'],
// ['date', 'Wed, 23 Nov 2022 05:17:11 GMT'],
// ['etag', 'W/"39-1849db13af9"'],
Expand Down Expand Up @@ -223,7 +220,7 @@ module('RequestManager | Response Currying', function () {
// @ts-expect-error
serialized.headers = (serialized.headers as [string, string][]).filter((v) => {
// don't test headers that change every time
return !['date', 'etag', 'last-modified'].includes(v[0]);
return !['content-length', 'date', 'etag', 'last-modified'].includes(v[0]);
});
// @ts-expect-error port is unstable in CI
delete serialized.url;
Expand All @@ -236,7 +233,6 @@ module('RequestManager | Response Currying', function () {
headers: [
['accept-ranges', 'bytes'],
['cache-control', 'public, max-age=0'],
['content-length', '57'],
['content-type', 'application/json; charset=UTF-8'],
// ['date', 'Wed, 23 Nov 2022 05:17:11 GMT'],
// ['etag', 'W/"39-1849db13af9"'],
Expand Down
3 changes: 1 addition & 2 deletions tests/request/tests/integration/response-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module('RequestManager | Response', function () {
// @ts-expect-error
serialized.headers = (serialized.headers as [string, string][]).filter((v) => {
// don't test headers that change every time
return !['date', 'etag', 'last-modified'].includes(v[0]);
return !['content-length', 'date', 'etag', 'last-modified'].includes(v[0]);
});
// @ts-expect-error port is unstable in CI
delete serialized.url;
Expand All @@ -34,7 +34,6 @@ module('RequestManager | Response', function () {
headers: [
['accept-ranges', 'bytes'],
['cache-control', 'public, max-age=0'],
['content-length', '57'],
['content-type', 'application/json; charset=UTF-8'],
// ['date', 'Wed, 23 Nov 2022 05:17:11 GMT'],
// ['etag', 'W/"39-1849db13af9"'],
Expand Down

0 comments on commit 6c24bd1

Please sign in to comment.