@shopgate/pwa-common-commerce 7.32.0-beta.2 → 7.32.0-beta.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cart/helpers/tax.js +2 -2
- package/cart/subscriptions/index.js +3 -3
- package/package.json +3 -3
- package/product/index.js +0 -1
- package/cart/selectors/spec.js +0 -189
- package/favorites/streams/spec.js +0 -517
- package/favorites/subscriptions/spec.js +0 -702
- package/product/collections/ProductImageFormats.js +0 -63
- package/product/collections/index.js +0 -1
- package/reviews/action-creators/spec.js +0 -40
- package/reviews/actions/spec.js +0 -255
- package/reviews/reducers/spec.js +0 -214
- package/reviews/selectors/spec.js +0 -100
- package/reviews/streams/spec.js +0 -26
- package/search/helpers/spec.js +0 -19
package/reviews/streams/spec.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import "core-js/modules/es.array.includes.js";
|
|
2
|
-
import * as actionTypes from "../constants";
|
|
3
|
-
import * as subjects from "./index";
|
|
4
|
-
const subjectActionsTypes = {
|
|
5
|
-
requestReviewSubmit$: [actionTypes.REQUEST_SUBMIT_REVIEW],
|
|
6
|
-
responseReviewSubmit$: [actionTypes.RECEIVE_SUBMIT_REVIEW, actionTypes.ERROR_SUBMIT_REVIEW, actionTypes.RESET_SUBMIT_REVIEW],
|
|
7
|
-
successReviewSubmit$: [actionTypes.RECEIVE_SUBMIT_REVIEW],
|
|
8
|
-
errorReviewSubmit$: [actionTypes.ERROR_SUBMIT_REVIEW, actionTypes.RESET_SUBMIT_REVIEW]
|
|
9
|
-
};
|
|
10
|
-
describe.skip('Reviews streams', () => {
|
|
11
|
-
it('should filter correctly', () => {
|
|
12
|
-
const possibleSubjects = Object.keys(subjects);
|
|
13
|
-
Object.keys(actionTypes).forEach(typeName => {
|
|
14
|
-
const type = actionTypes[typeName];
|
|
15
|
-
possibleSubjects.forEach(subjectName => {
|
|
16
|
-
const result = subjects[subjectName].operator.predicate({
|
|
17
|
-
action: {
|
|
18
|
-
type
|
|
19
|
-
}
|
|
20
|
-
});
|
|
21
|
-
const shouldBe = subjectActionsTypes[subjectName].includes(type);
|
|
22
|
-
expect(result).toBe(shouldBe);
|
|
23
|
-
});
|
|
24
|
-
});
|
|
25
|
-
});
|
|
26
|
-
});
|
package/search/helpers/spec.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import removeHighlightingPlaceholders from "./removeHighlightingPlaceholders";
|
|
2
|
-
describe('search/helpers', () => {
|
|
3
|
-
describe('removeHighlightingPlaceholers test', () => {
|
|
4
|
-
it('should not change string without placeholders', () => {
|
|
5
|
-
const result = removeHighlightingPlaceholders(['foo', 'bar']);
|
|
6
|
-
expect(result[0]).toBe('foo');
|
|
7
|
-
});
|
|
8
|
-
it('should remove $start$ and $end$', () => {
|
|
9
|
-
const testArray = ['$start$foo$end$', '$start$$end$', '$end$$start$', '$start$foo$end$'];
|
|
10
|
-
const result = removeHighlightingPlaceholders(testArray);
|
|
11
|
-
result.forEach((item, key) => {
|
|
12
|
-
expect(item.indexOf('start')).toBe(-1);
|
|
13
|
-
expect(item.indexOf('end')).toBe(-1);
|
|
14
|
-
expect(item.indexOf('$')).toBe(-1);
|
|
15
|
-
expect(item.length).toBe(Math.max(testArray[key].length - 12, 0));
|
|
16
|
-
});
|
|
17
|
-
});
|
|
18
|
-
});
|
|
19
|
-
});
|