Skip to content

Commit 0ca1f5e

Browse files
committed
chore: undoing a copy pasta error
1 parent 9781416 commit 0ca1f5e

File tree

1 file changed

+0
-102
lines changed

1 file changed

+0
-102
lines changed

test/index.js

Lines changed: 0 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -823,108 +823,6 @@ describe('onPostBuild', () => {
823823
])
824824
})
825825

826-
test('appends headers to existing headers in the Netlify configuration', async () => {
827-
await moveNextDist()
828-
829-
netlifyConfig.headers = [
830-
{
831-
for: '/',
832-
values: {
833-
'x-existing-header-in-configuration': 'existing header in configuration value',
834-
},
835-
},
836-
]
837-
838-
const show = jest.fn()
839-
840-
await plugin.onPostBuild({
841-
...defaultArgs,
842-
843-
utils: { ...defaultArgs.utils, status: { show }, functions: { list: jest.fn().mockResolvedValue([]) } },
844-
})
845-
846-
expect(netlifyConfig.headers).toEqual([
847-
{
848-
for: '/',
849-
values: {
850-
'x-existing-header-in-configuration': 'existing header in configuration value',
851-
},
852-
},
853-
{
854-
for: '/',
855-
values: {
856-
'x-custom-header': 'my custom header value',
857-
},
858-
},
859-
{
860-
for: '/en/',
861-
values: {
862-
'x-custom-header': 'my custom header value',
863-
},
864-
},
865-
{
866-
for: '/es/',
867-
values: {
868-
'x-custom-header': 'my custom header value',
869-
},
870-
},
871-
{
872-
for: '/fr/',
873-
values: {
874-
'x-custom-header': 'my custom header value',
875-
},
876-
},
877-
{
878-
for: '/api/*',
879-
values: {
880-
'x-custom-api-header': 'my custom api header value',
881-
},
882-
},
883-
{
884-
for: '/en/api/*',
885-
values: {
886-
'x-custom-api-header': 'my custom api header value',
887-
},
888-
},
889-
{
890-
for: '/es/api/*',
891-
values: {
892-
'x-custom-api-header': 'my custom api header value',
893-
},
894-
},
895-
{
896-
for: '/fr/api/*',
897-
values: {
898-
'x-custom-api-header': 'my custom api header value',
899-
},
900-
},
901-
{
902-
for: '/*',
903-
values: {
904-
'x-custom-header-for-everything': 'my custom header for everything value',
905-
},
906-
},
907-
{
908-
for: '/en/*',
909-
values: {
910-
'x-custom-header-for-everything': 'my custom header for everything value',
911-
},
912-
},
913-
{
914-
for: '/es/*',
915-
values: {
916-
'x-custom-header-for-everything': 'my custom header for everything value',
917-
},
918-
},
919-
{
920-
for: '/fr/*',
921-
values: {
922-
'x-custom-header-for-everything': 'my custom header for everything value',
923-
},
924-
},
925-
])
926-
})
927-
928826
test('appends no additional headers in the Netlify configuration when none are in the routes manifest', async () => {
929827
await moveNextDist()
930828

0 commit comments

Comments
 (0)