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 43ef761
Show file tree
Hide file tree
Showing 5 changed files with 68 additions and 65 deletions.
27 changes: 0 additions & 27 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,6 @@
. "$(dirname -- "$0")/_/husky.sh"


npm run check-format ||
(
echo '
🤢🤮🤢🤮 ##################### PRETTIER ################## 🤢🤮🤢🤮
❌❌❌❌❌❌❌ Prettier Check Failed. ❌❌❌❌❌❌❌
🤢🤮🤢🤮 ##################### PRETTIER ################## 🤢🤮🤢🤮
';
false;
)

echo ' '
echo '⌛⌛⌛Loading.......😅😅😅'
echo '⌛⌛⌛Loading.......😅😅😅'
echo '⌛⌛⌛Loading.......😅😅😅'
echo ' '

npm run check-lint ||
(
echo '
😤🏀👋😤 ############### ESLINT ################# 😤🏀👋😤
❌❌❌❌❌❌❌ ESLint Check Failed. ❌❌❌❌❌❌❌
😤🏀👋😤 ############### ESLINT ################# 😤🏀👋😤
'
false;
)


echo ' '
Expand Down
35 changes: 35 additions & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,41 @@



npm run check-format ||
(
echo '
🤢🤮🤢🤮 ##################### PRETTIER ################## 🤢🤮🤢🤮
❌❌❌❌❌❌❌ Prettier Check Failed. ❌❌❌❌❌❌❌
🤢🤮🤢🤮 ##################### PRETTIER ################## 🤢🤮🤢🤮
';
false;
)

echo ' '
echo '⌛⌛⌛Loading.......😅😅😅'
echo '⌛⌛⌛Loading.......😅😅😅'
echo '⌛⌛⌛Loading.......😅😅😅'
echo ' '

npm run check-lint ||
(
echo '
😤🏀👋😤 ############### ESLINT ################# 😤🏀👋😤
❌❌❌❌❌❌❌ ESLint Check Failed. ❌❌❌❌❌❌❌
😤🏀👋😤 ############### ESLINT ################# 😤🏀👋😤
'
false;
)


echo ' '
echo '⌛⌛⌛Loading.......😅😅😅'
echo '⌛⌛⌛Loading.......😅😅😅'
echo '⌛⌛⌛Loading.......😅😅😅'
echo ' '


echo ' '
echo ' '
Expand Down
26 changes: 0 additions & 26 deletions cypress/integration/marketing/homepage.spec.js

This file was deleted.

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

describe('test for routes in marketing pages', () => {
const urls = [
'/',
'/mindshare/',
'/ai/',
'/why-zesty/',
'/marketplace/installed/',
'/marketplace/register/',
'/contact/',
];

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 43ef761

Please sign in to comment.