GSG-G10 / DevMonkeys-Ecommerce

0 stars 1 forks source link

Tests #38

Open Mu7ammadAbed opened 3 years ago

Mu7ammadAbed commented 3 years ago

You did a great job with tests and you wrote enough tests to cover all the pure logic functions you have but there's a problem encountered with the imports and the export https://github.com/GSG-G10/DevMonkeys-Ecommerce/blob/0b47b4ec1f48ee4bd3270d6c49b4f9ce9c2a47b9/test/test.js#L1

There's some repeated functions , it should be like this and filterByCategory isn't exported in logic.js

const {filterByCategory , FilterByPrice ,search,addItem , deleteItem, editItem, sumCart} = require ("../js/logic.js");
if (typeof module !== 'undefined') {
  module.exports = {
    filterByCategory, addItem, search, editItem, sumCart, FilterByPrice, deleteItem
  }
}
omar-shaath commented 3 years ago

Noted!