@@ -1,17 +1,17 @@
module.exports = {
- coverageDirectory: "coverage",
+ coverageDirectory: 'coverage',
moduleFileExtensions: [
- "js",
- "json",
- "ts",
+ 'js',
+ 'json',
+ 'ts',
],
- preset: "ts-jest",
+ preset: 'ts-jest',
rootDir: __dirname,
roots: [
- "<rootDir>/src",
- "<rootDir>/mock-data",
+ '<rootDir>/src',
+ '<rootDir>/mock-data',
transform: {
- "^.+\\.(t|j)s$": "ts-jest",
+ '^.+\\.(t|j)s$': 'ts-jest',
},
};
@@ -38,7 +38,7 @@ export const atLeastNOfProduct = new PromotionCondition({
check(order: Order, args) {
return order.lines.reduce((result, item) => {
return result || item.quantity >= args.minimum;
- }, false);
+ }, false as boolean);
});
@@ -180,7 +180,7 @@ export class OrderCalculator {
const allFacetValues = unique([...variant.facetValues, ...variant.product.facetValues], 'id');
return facetValueIds.reduce(
(result, id) => result && !!allFacetValues.find(fv => idsAreEqual(fv.id, id)),
- true,
+ true as boolean,
);
@@ -5,6 +5,7 @@
"removeComments": true,
"strictPropertyInitialization": false,
"sourceMap": true,
- "newLine": "LF"
+ "newLine": "LF",
+ "allowJs": true
}