Skip to content

Commit

Permalink
fix(next.config.js): #2073
Browse files Browse the repository at this point in the history
  • Loading branch information
darwin.apolinario committed Oct 25, 2023
1 parent 484d77f commit 3db83f6
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 38 deletions.
26 changes: 0 additions & 26 deletions cypress/integration/marketing/homepage.spec.js

This file was deleted.

27 changes: 27 additions & 0 deletions cypress/integration/marketing/marketing.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/* eslint-disable cypress/no-unnecessary-waiting */
/// <reference types="cypress" />

import routes from '../../../src/components/globals/FillerContent';

describe('test for routes in marketing pages', () => {
const urls = routes.routingJSON.slice(0, 3);

const requests = urls.map((route) => {
return cy.request({
url: Cypress.config().baseUrl + route.uri,
failOnStatusCode: false,
});
});

it('should load all URLs without encountering 404', () => {
return Promise.all(requests).then((responses) => {
responses.forEach((response, index) => {
expect(response.status, `URL: ${urls[index].url}`).to.not.equal(404);
expect(response.body, `URL: ${urls[index].url}`).not.to.contain(
'404 Not Found',
);
});
cy.get('body').should('exist');
});
});
});
12 changes: 0 additions & 12 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,4 @@ module.exports = {
],
},
swcMinify: true,

webpack: (config, { dev, isServer }) => {
if (!dev && !isServer) {
Object.assign(config.resolve.alias, {
'react/jsx-runtime.js': 'preact/compat/jsx-runtime',
react: 'preact/compat',
'react-dom/test-utils': 'preact/test-utils',
'react-dom': 'preact/compat',
});
}
return config;
},
};

0 comments on commit 3db83f6

Please sign in to comment.