@open3cl/engine 1.0.5 → 1.0.7

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.
Files changed (68) hide show
  1. package/11_nadeq.spec.js +3 -2
  2. package/16.2_production_enr.spec.js +1 -0
  3. package/3.2.1_mur.spec.js +1 -0
  4. package/3.2.2_plancher_bas.spec.js +1 -0
  5. package/3.3_baie_vitree.spec.js +1 -0
  6. package/6.1_apport_gratuit.spec.js +1 -0
  7. package/7_inertie.spec.js +4 -3
  8. package/9_chauffage.spec.js +1 -0
  9. package/9_conso_ch.spec.js +1 -0
  10. package/9_generateur_ch.spec.js +1 -0
  11. package/conso.spec.js +1 -0
  12. package/core/assets/domain/synchronize-assets.spec.js +9 -9
  13. package/core/assets/domain/synchronize-c1-tables.spec.js +4 -4
  14. package/core/assets/domain/synchronize-dpe-ges-limit-values-tables.spec.js +6 -6
  15. package/core/assets/domain/synchronize-enum-tables.spec.js +10 -10
  16. package/core/assets/domain/synchronize-solicitations-tables.spec.js +6 -6
  17. package/core/assets/domain/synchronize-valeur-tables.spec.js +14 -14
  18. package/core/file/infrastructure/adapter/file.store.spec.js +5 -4
  19. package/core/tv/infrastructure/tvs.store.spec.js +3 -2
  20. package/core/util/infrastructure/object-util.spec.js +2 -1
  21. package/core/util/logger/log-service.js +47 -0
  22. package/features/dpe/domain/models/baie-ets.model.ts +12 -0
  23. package/features/dpe/domain/models/baie-vitree.model.ts +95 -0
  24. package/features/dpe/domain/models/climatisation.model.ts +25 -0
  25. package/features/dpe/domain/models/dpe.model.ts +194 -0
  26. package/features/dpe/domain/models/ets.model.ts +19 -0
  27. package/features/dpe/domain/models/installation-chauffage.model.ts +101 -0
  28. package/features/dpe/domain/models/installation-ecs.model.ts +76 -0
  29. package/features/dpe/domain/models/mur.model.ts +37 -0
  30. package/features/dpe/domain/models/plancher-bas.model.ts +38 -0
  31. package/features/dpe/domain/models/plancher-haut.model.ts +33 -0
  32. package/features/dpe/domain/models/pont-thermique.model.ts +21 -0
  33. package/features/dpe/domain/models/porte.model.ts +31 -0
  34. package/features/dpe/domain/models/production-elec-enr.model.ts +27 -0
  35. package/features/dpe/domain/models/sortie.model.ts +178 -0
  36. package/features/dpe/domain/models/type-habitation.model.js +8 -0
  37. package/features/dpe/domain/models/type-ventilation.model.js +8 -0
  38. package/features/dpe/domain/models/ventilation.model.ts +33 -0
  39. package/features/dpe/infrastructure/tv.store.js +389 -0
  40. package/features/dpe/infrastructure/tv.store.spec.js +690 -0
  41. package/features/engine/domain/constants.js +1 -0
  42. package/features/engine/domain/contexte.builder.js +140 -0
  43. package/features/engine/domain/contexte.builder.spec.js +152 -0
  44. package/features/engine/domain/engine.service.js +139 -0
  45. package/features/engine/domain/engine.service.spec.js +7 -0
  46. package/features/engine/domain/enveloppe/deperdition-enveloppe.service.js +262 -0
  47. package/features/engine/domain/enveloppe/deperdition-enveloppe.service.spec.js +282 -0
  48. package/features/engine/domain/enveloppe/deperdition.service.js +101 -0
  49. package/features/engine/domain/enveloppe/mur/deperdition-mur.service.js +168 -0
  50. package/features/engine/domain/enveloppe/mur/deperdition-mur.service.spec.js +345 -0
  51. package/features/engine/domain/enveloppe/plancher_bas/deperdition-plancher-bas.service.js +169 -0
  52. package/features/engine/domain/enveloppe/plancher_bas/deperdition-plancher-bas.service.spec.js +200 -0
  53. package/features/engine/domain/enveloppe/plancher_haut/deperdition-plancher-haut.service.js +136 -0
  54. package/features/engine/domain/enveloppe/plancher_haut/deperdition-plancher-haut.service.spec.js +211 -0
  55. package/features/engine/domain/enveloppe/porte/deperdition-porte.service.js +56 -0
  56. package/features/engine/domain/enveloppe/porte/deperdition-porte.service.spec.js +116 -0
  57. package/features/engine/domain/enveloppe/ventilation/deperdition-ventilation.service.js +338 -0
  58. package/features/engine/domain/enveloppe/ventilation/deperdition-ventilation.service.spec.js +393 -0
  59. package/features/engine/domain/models/contexte.model.ts +10 -0
  60. package/features/engine/domain/models/deperdition.model.ts +8 -0
  61. package/features/normalizer/domain/dpe-normalizer.service.js +24 -0
  62. package/features/normalizer/domain/dpe-normalizer.service.spec.js +3 -0
  63. package/ficheTechnique.spec.js +4 -3
  64. package/output.js +1 -0
  65. package/package.json +9 -8
  66. package/tv-v2.js +79121 -0
  67. package/utils.js +4 -8
  68. package/utils.spec.js +4 -3
@@ -0,0 +1,393 @@
1
+ import { TvStore } from '../../../../dpe/infrastructure/tv.store.js';
2
+ import { DeperditionVentilationService } from './deperdition-ventilation.service.js';
3
+ import { beforeEach, describe, expect, test, vi } from 'vitest';
4
+ import { TypeHabitation } from '../../../../dpe/domain/models/type-habitation.model.js';
5
+
6
+ /** @type {DeperditionVentilationService} **/
7
+ let service;
8
+
9
+ /** @type {TvStore} **/
10
+ let tvStore;
11
+
12
+ describe('Calcul de déperdition des portes', () => {
13
+ beforeEach(() => {
14
+ tvStore = new TvStore();
15
+ service = new DeperditionVentilationService(tvStore);
16
+ });
17
+
18
+ describe('Determination de q4paConv', () => {
19
+ /** @type {Contexte} */
20
+ let ctx = { typeHabitation: TypeHabitation.MAISON };
21
+
22
+ test.each([
23
+ {
24
+ q4paConvSaisi: undefined,
25
+ enumPeriodeConstructionId: '1',
26
+ surfaceIsolee: 0,
27
+ surfaceNonIsolee: 0,
28
+ surfaceMenuiserieAvecJoint: 0,
29
+ surfaceMenuiserieSansJoint: 0,
30
+ expectedIsolationSurface: '0',
31
+ expectedPresenceJointsMenuiserie: undefined
32
+ },
33
+ {
34
+ q4paConvSaisi: undefined,
35
+ enumPeriodeConstructionId: '1',
36
+ surfaceIsolee: 200,
37
+ surfaceNonIsolee: 100,
38
+ surfaceMenuiserieAvecJoint: 0,
39
+ surfaceMenuiserieSansJoint: 0,
40
+ expectedIsolationSurface: '1',
41
+ expectedPresenceJointsMenuiserie: undefined
42
+ },
43
+ {
44
+ q4paConvSaisi: undefined,
45
+ enumPeriodeConstructionId: '1',
46
+ surfaceIsolee: 200,
47
+ surfaceNonIsolee: 300,
48
+ surfaceMenuiserieAvecJoint: 100,
49
+ surfaceMenuiserieSansJoint: 0,
50
+ expectedIsolationSurface: '0',
51
+ expectedPresenceJointsMenuiserie: '1'
52
+ },
53
+ {
54
+ q4paConvSaisi: undefined,
55
+ enumPeriodeConstructionId: '1',
56
+ surfaceIsolee: 200,
57
+ surfaceNonIsolee: 300,
58
+ surfaceMenuiserieAvecJoint: 100,
59
+ surfaceMenuiserieSansJoint: 200,
60
+ expectedIsolationSurface: '0',
61
+ expectedPresenceJointsMenuiserie: undefined
62
+ },
63
+ {
64
+ q4paConvSaisi: undefined,
65
+ enumPeriodeConstructionId: '2',
66
+ surfaceIsolee: 200,
67
+ surfaceNonIsolee: 100,
68
+ surfaceMenuiserieAvecJoint: 0,
69
+ surfaceMenuiserieSansJoint: 0,
70
+ expectedIsolationSurface: '1',
71
+ expectedPresenceJointsMenuiserie: undefined
72
+ },
73
+ {
74
+ q4paConvSaisi: undefined,
75
+ enumPeriodeConstructionId: '3',
76
+ surfaceIsolee: 200,
77
+ surfaceNonIsolee: 100,
78
+ surfaceMenuiserieAvecJoint: 0,
79
+ surfaceMenuiserieSansJoint: 0,
80
+ expectedIsolationSurface: undefined,
81
+ expectedPresenceJointsMenuiserie: undefined
82
+ },
83
+ {
84
+ q4paConvSaisi: 12.5,
85
+ enumPeriodeConstructionId: '1',
86
+ surfaceIsolee: 0,
87
+ surfaceNonIsolee: 0,
88
+ surfaceMenuiserieAvecJoint: 0,
89
+ surfaceMenuiserieSansJoint: 0,
90
+ expectedIsolationSurface: '0',
91
+ expectedPresenceJointsMenuiserie: undefined
92
+ }
93
+ ])(
94
+ '$q4paConvSaisi: q4paConvSaisi, $enumPeriodeConstructionId: enumPeriodeConstructionId, $surfaceIsolee: surfaceIsolee,' +
95
+ '$surfaceNonIsolee: surfaceNonIsolee, $surfaceMenuiserieAvecJoint: surfaceMenuiserieAvecJoint, $surfaceMenuiserieSansJoint: surfaceMenuiserieSansJoint,' +
96
+ '$expectedIsolationSurface: expectedIsolationSurface, $expectedPresenceJointsMenuiserie: expectedPresenceJointsMenuiserie',
97
+ ({
98
+ q4paConvSaisi,
99
+ enumPeriodeConstructionId,
100
+ surfaceIsolee,
101
+ surfaceNonIsolee,
102
+ surfaceMenuiserieAvecJoint,
103
+ surfaceMenuiserieSansJoint,
104
+ expectedIsolationSurface,
105
+ expectedPresenceJointsMenuiserie
106
+ }) => {
107
+ vi.spyOn(tvStore, 'getQ4paConv').mockReturnValue({ q4pa_conv: 18.8 });
108
+ ctx.enumPeriodeConstructionId = enumPeriodeConstructionId;
109
+
110
+ /** @type {VentilationDE} */
111
+ const de = {
112
+ q4pa_conv_saisi: q4paConvSaisi
113
+ };
114
+
115
+ const q4paConv = service.q4paConv(
116
+ de,
117
+ ctx,
118
+ surfaceIsolee,
119
+ surfaceNonIsolee,
120
+ surfaceMenuiserieAvecJoint,
121
+ surfaceMenuiserieSansJoint
122
+ );
123
+
124
+ if (q4paConvSaisi) {
125
+ expect(tvStore.getQ4paConv).not.toHaveBeenCalled();
126
+ expect(q4paConv).toBe(q4paConvSaisi);
127
+ } else {
128
+ expect(tvStore.getQ4paConv).toHaveBeenCalledWith(
129
+ enumPeriodeConstructionId,
130
+ TypeHabitation.MAISON,
131
+ expectedIsolationSurface,
132
+ expectedPresenceJointsMenuiserie
133
+ );
134
+ expect(q4paConv).toBe(18.8);
135
+ }
136
+ }
137
+ );
138
+
139
+ test('calcul de hvent', () => {
140
+ expect(service.hvent(108, { qvarep_conv: 10 })).toBeCloseTo(367.2, 2);
141
+ });
142
+ });
143
+
144
+ describe('Determination de hperm', () => {
145
+ /** @type {Contexte} */
146
+ let ctx = { typeHabitation: TypeHabitation.MAISON, surfaceHabitable: 100 };
147
+
148
+ test.each([
149
+ { plusieursFacadeExposee: false, expectedHperm: 15.04 },
150
+ { plusieursFacadeExposee: true, expectedHperm: 98.97 }
151
+ ])(
152
+ '$plusieursFacadeExposee: plusieursFacadeExposee, $expectedHperm: expectedHperm',
153
+ ({ plusieursFacadeExposee, expectedHperm }) => {
154
+ ctx.hauteurSousPlafond = 10;
155
+
156
+ /** @type {VentilationDE} */
157
+ const de = {
158
+ plusieurs_facade_exposee: plusieursFacadeExposee
159
+ };
160
+
161
+ const hperm = service.hperm(
162
+ de,
163
+ { smea_conv: 18, qvasouf_conv: 15.3, qvarep_conv: 13.2 },
164
+ ctx,
165
+ 10.5,
166
+ 19.6
167
+ );
168
+ expect(hperm).toBeCloseTo(expectedHperm, 2);
169
+ }
170
+ );
171
+ });
172
+
173
+ describe('Determination de pventMoy', () => {
174
+ test.each([
175
+ {
176
+ label: 'Ventilation par ouverture des fenêtres',
177
+ typeVentilation: '1',
178
+ typeHabitation: TypeHabitation.MAISON,
179
+ ventilationPost2012: true,
180
+ surfaceHabitable: 100,
181
+ qvarepConv: 10,
182
+ expectedPventMoy: 0
183
+ },
184
+ {
185
+ label: 'Ventilation naturelle par conduit',
186
+ typeVentilation: '25',
187
+ typeHabitation: TypeHabitation.APPARTEMENT,
188
+ ventilationPost2012: false,
189
+ surfaceHabitable: 100,
190
+ qvarepConv: 10,
191
+ expectedPventMoy: 0
192
+ },
193
+ {
194
+ label: 'Ventilation Simple flux auto SF AUTO',
195
+ typeVentilation: '4',
196
+ typeHabitation: TypeHabitation.MAISON,
197
+ ventilationPost2012: true,
198
+ surfaceHabitable: 100,
199
+ qvarepConv: 10,
200
+ expectedPventMoy: 35
201
+ },
202
+ {
203
+ label: 'Ventilation Simple flux auto SF AUTO',
204
+ typeVentilation: '4',
205
+ typeHabitation: TypeHabitation.MAISON,
206
+ ventilationPost2012: false,
207
+ surfaceHabitable: 100,
208
+ qvarepConv: 10,
209
+ expectedPventMoy: 65
210
+ },
211
+ {
212
+ label: 'Ventilation Simple flux auto SF AUTO',
213
+ typeVentilation: '4',
214
+ typeHabitation: TypeHabitation.APPARTEMENT,
215
+ ventilationPost2012: true,
216
+ surfaceHabitable: 100,
217
+ qvarepConv: 10,
218
+ expectedPventMoy: 250
219
+ },
220
+ {
221
+ label: 'Ventilation Simple flux auto SF AUTO',
222
+ typeVentilation: '4',
223
+ typeHabitation: TypeHabitation.APPARTEMENT,
224
+ ventilationPost2012: false,
225
+ surfaceHabitable: 100,
226
+ qvarepConv: 10,
227
+ expectedPventMoy: 460
228
+ },
229
+ {
230
+ label: 'Ventilation Simple flux auto SF GAZ',
231
+ typeVentilation: '10',
232
+ typeHabitation: TypeHabitation.MAISON,
233
+ ventilationPost2012: true,
234
+ surfaceHabitable: 100,
235
+ qvarepConv: 10,
236
+ expectedPventMoy: 35
237
+ },
238
+ {
239
+ label: 'Ventilation Simple flux auto SF GAZ',
240
+ typeVentilation: '11',
241
+ typeHabitation: TypeHabitation.MAISON,
242
+ ventilationPost2012: false,
243
+ surfaceHabitable: 100,
244
+ qvarepConv: 10,
245
+ expectedPventMoy: 65
246
+ },
247
+ {
248
+ label: 'Ventilation Simple flux auto SF GAZ',
249
+ typeVentilation: '10',
250
+ typeHabitation: TypeHabitation.APPARTEMENT,
251
+ ventilationPost2012: true,
252
+ surfaceHabitable: 100,
253
+ qvarepConv: 10,
254
+ expectedPventMoy: 250
255
+ },
256
+ {
257
+ label: 'Ventilation Simple flux auto SF GAZ',
258
+ typeVentilation: '12',
259
+ typeHabitation: TypeHabitation.APPARTEMENT,
260
+ ventilationPost2012: false,
261
+ surfaceHabitable: 100,
262
+ qvarepConv: 10,
263
+ expectedPventMoy: 460
264
+ },
265
+ {
266
+ label: 'Ventilation Simple flux hygro SF HYGRO',
267
+ typeVentilation: '7',
268
+ typeHabitation: TypeHabitation.MAISON,
269
+ ventilationPost2012: true,
270
+ surfaceHabitable: 100,
271
+ qvarepConv: 10,
272
+ expectedPventMoy: 15
273
+ },
274
+ {
275
+ label: 'Ventilation Simple flux hygro SF HYGRO',
276
+ typeVentilation: '8',
277
+ typeHabitation: TypeHabitation.MAISON,
278
+ ventilationPost2012: false,
279
+ surfaceHabitable: 100,
280
+ qvarepConv: 10,
281
+ expectedPventMoy: 50
282
+ },
283
+ {
284
+ label: 'Ventilation Simple flux hygro SF HYGRO',
285
+ typeVentilation: '9',
286
+ typeHabitation: TypeHabitation.APPARTEMENT,
287
+ ventilationPost2012: true,
288
+ surfaceHabitable: 100,
289
+ qvarepConv: 10,
290
+ expectedPventMoy: 250
291
+ },
292
+ {
293
+ label: 'Ventilation Simple flux hygro SF HYGRO',
294
+ typeVentilation: '13',
295
+ typeHabitation: TypeHabitation.APPARTEMENT,
296
+ ventilationPost2012: false,
297
+ surfaceHabitable: 100,
298
+ qvarepConv: 10,
299
+ expectedPventMoy: 460
300
+ },
301
+ {
302
+ label: 'Ventilation double flux hygro DF INDIVIDUELLE',
303
+ typeVentilation: '19',
304
+ typeHabitation: TypeHabitation.MAISON,
305
+ ventilationPost2012: true,
306
+ surfaceHabitable: 100,
307
+ qvarepConv: 10,
308
+ expectedPventMoy: 35
309
+ },
310
+ {
311
+ label: 'Ventilation double flux hygro DF INDIVIDUELLE',
312
+ typeVentilation: '19',
313
+ typeHabitation: TypeHabitation.MAISON,
314
+ ventilationPost2012: false,
315
+ surfaceHabitable: 100,
316
+ qvarepConv: 10,
317
+ expectedPventMoy: 80
318
+ },
319
+ {
320
+ label: 'Ventilation double flux hygro DF INDIVIDUELLE',
321
+ typeVentilation: '19',
322
+ typeHabitation: TypeHabitation.APPARTEMENT,
323
+ ventilationPost2012: true,
324
+ surfaceHabitable: 100,
325
+ qvarepConv: 10,
326
+ expectedPventMoy: 600
327
+ },
328
+ {
329
+ label: 'Ventilation double flux hygro DF INDIVIDUELLE',
330
+ typeVentilation: '19',
331
+ typeHabitation: TypeHabitation.APPARTEMENT,
332
+ ventilationPost2012: false,
333
+ surfaceHabitable: 100,
334
+ qvarepConv: 10,
335
+ expectedPventMoy: 1100
336
+ },
337
+ {
338
+ label: 'Ventilation simple flux auto HYBRIDE',
339
+ typeVentilation: '26',
340
+ typeHabitation: TypeHabitation.MAISON,
341
+ ventilationPost2012: true,
342
+ surfaceHabitable: 100,
343
+ qvarepConv: 10,
344
+ expectedPventMoy: 2.92
345
+ },
346
+ {
347
+ label: 'Ventilation simple flux auto HYBRIDE',
348
+ typeVentilation: '27',
349
+ typeHabitation: TypeHabitation.MAISON,
350
+ ventilationPost2012: false,
351
+ surfaceHabitable: 100,
352
+ qvarepConv: 10,
353
+ expectedPventMoy: 5.42
354
+ },
355
+ {
356
+ label: 'Ventilation simple flux auto HYBRIDE',
357
+ typeVentilation: '28',
358
+ typeHabitation: TypeHabitation.APPARTEMENT,
359
+ ventilationPost2012: true,
360
+ surfaceHabitable: 100,
361
+ qvarepConv: 10,
362
+ expectedPventMoy: 41.67
363
+ },
364
+ {
365
+ label: 'Ventilation simple flux auto HYBRIDE',
366
+ typeVentilation: '29',
367
+ typeHabitation: TypeHabitation.APPARTEMENT,
368
+ ventilationPost2012: false,
369
+ surfaceHabitable: 100,
370
+ qvarepConv: 10,
371
+ expectedPventMoy: 76.67
372
+ }
373
+ ])(
374
+ '$typeVentilation: typeVentilation, $typeHabitation: typeHabitation, $ventilationPost2012: ventilationPost2012, $surfaceHabitable: surfaceHabitable, $qvarepConv: qvarepConv',
375
+ ({
376
+ typeVentilation,
377
+ typeHabitation,
378
+ ventilationPost2012,
379
+ surfaceHabitable,
380
+ qvarepConv,
381
+ expectedPventMoy
382
+ }) => {
383
+ const pventMoy = service.pventMoy(
384
+ typeVentilation,
385
+ { typeHabitation, surfaceHabitable },
386
+ ventilationPost2012,
387
+ { qvarep_conv: qvarepConv }
388
+ );
389
+ expect(pventMoy).toBeCloseTo(expectedPventMoy, 2);
390
+ }
391
+ );
392
+ });
393
+ });
@@ -0,0 +1,10 @@
1
+ import { TypeHabitation } from '../../../dpe/domain/models/dpe.model';
2
+
3
+ export interface Contexte {
4
+ typeHabitation: TypeHabitation;
5
+ enumPeriodeConstructionId: string;
6
+ surfaceHabitable: string;
7
+ hauteurSousPlafond: string;
8
+ zoneClimatiqueId: string;
9
+ effetJoule: boolean;
10
+ }
@@ -0,0 +1,8 @@
1
+ export interface DeperditionData {
2
+ enumTypeAdjacenceId?: string;
3
+ surfaceAiu?: number;
4
+ surfaceAue?: number;
5
+ enumCfgIsolationLncId?: string;
6
+ tvCoefReductionDeperditionId?: string;
7
+ zoneClimatiqueId?: string;
8
+ }
@@ -0,0 +1,24 @@
1
+ import { DpePreProcessor } from '../../../../../preprocessor/index.js';
2
+
3
+ /**
4
+ * Service de normalisation du DPE d'entrée
5
+ * Permet de redresser / complèter des données d'entrées
6
+ */
7
+ export class DpeNormalizerService {
8
+ /**
9
+ * @param dpe {Dpe}
10
+ * @return {Dpe} Normalized DPE
11
+ */
12
+ normalize(dpe) {
13
+ /**
14
+ * On clone le DPE d'origine pour ne pas le modifier
15
+ * @type {Dpe}
16
+ */
17
+ let normalizedDpe = JSON.parse(JSON.stringify(dpe));
18
+
19
+ const dpePreProcessor = new DpePreProcessor();
20
+ dpePreProcessor.preprocess(normalizedDpe);
21
+
22
+ return normalizedDpe;
23
+ }
24
+ }
@@ -0,0 +1,3 @@
1
+ import { describe } from 'vitest';
2
+
3
+ describe.skip('Normalisation des DPE', () => {});
@@ -1,4 +1,5 @@
1
1
  import getFicheTechnique from './ficheTechnique.js';
2
+ import { describe, expect, test } from 'vitest';
2
3
 
3
4
  describe('FicheTechnique service tests', () => {
4
5
  const dpe = {
@@ -119,7 +120,7 @@ describe('FicheTechnique service tests', () => {
119
120
  }
120
121
  };
121
122
 
122
- it('should return a fiche technique', async () => {
123
+ test('should return a fiche technique', async () => {
123
124
  let fiche = getFicheTechnique(dpe, '10', 'exposées');
124
125
  expect(fiche).not.toBeNull();
125
126
  expect(fiche.description).toBe('Façades exposées: plusieurs');
@@ -148,14 +149,14 @@ describe('FicheTechnique service tests', () => {
148
149
  expect(fiche).not.toBeNull();
149
150
  });
150
151
 
151
- it('should return a fiche technique with multiple criteria', async () => {
152
+ test('should return a fiche technique with multiple criteria', async () => {
152
153
  let fiche = getFicheTechnique(dpe, '10', 'exposées', [1950, 'Gaz']);
153
154
  expect(fiche).not.toBeNull();
154
155
  expect(fiche.description).toBe('Façades exposées: plusieurs');
155
156
  expect(fiche.valeur).toBe('aucune');
156
157
  });
157
158
 
158
- it('should not return a non existing fiche technique', async () => {
159
+ test('should not return a non existing fiche technique', async () => {
159
160
  let fiche = getFicheTechnique(dpe, '40', 'exposées');
160
161
  expect(fiche).toBeNull();
161
162
 
package/output.js ADDED
@@ -0,0 +1 @@
1
+ filecontent
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open3cl/engine",
3
- "version": "1.0.5",
3
+ "version": "1.0.7",
4
4
  "description": "Open Source 3CL-DPE engine",
5
5
  "main": "index.js",
6
6
  "directories": {
@@ -12,7 +12,8 @@
12
12
  "access": "public"
13
13
  },
14
14
  "scripts": {
15
- "test": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
15
+ "test": "vitest run",
16
+ "test:ci": "vitest run --coverage",
16
17
  "test:benchmark": "node inspect test/run_benchmark.js",
17
18
  "qa:lint": "eslint .",
18
19
  "qa:lint:fix": "npm run qa:lint -- --fix",
@@ -32,9 +33,10 @@
32
33
  "3cl"
33
34
  ],
34
35
  "dependencies": {
35
- "@jest/globals": "^29.7.0",
36
+ "dioma": "^0.4.6",
36
37
  "fast-xml-parser": "^4.5.0",
37
- "lodash": "^4.17.21"
38
+ "lodash": "^4.17.21",
39
+ "winston": "3.13.0"
38
40
  },
39
41
  "devDependencies": {
40
42
  "@commitlint/cli": "^19.2.1",
@@ -43,8 +45,8 @@
43
45
  "@semantic-release/changelog": "^6.0.3",
44
46
  "@semantic-release/git": "^10.0.1",
45
47
  "@semantic-release/github": "^10.0.2",
46
- "@types/jest": "^29.5.12",
47
48
  "@types/node": "^20.12.4",
49
+ "@vitest/coverage-v8": "^3.0.6",
48
50
  "deep-object-diff": "^1.1.9",
49
51
  "eslint": "^8.57.0",
50
52
  "eslint-config-prettier": "^9.1.0",
@@ -54,15 +56,14 @@
54
56
  "eslint-plugin-n": "^16.6.2",
55
57
  "eslint-plugin-promise": "^6.1.1",
56
58
  "husky": "^9.0.11",
57
- "jest": "^29.7.0",
58
- "jest-html-reporter": "^3.10.2",
59
59
  "jscpd": "^3.5.10",
60
60
  "prettier": "^3.2.5",
61
61
  "pretty-quick": "^4.0.0",
62
62
  "semantic-release": "^23.0.6",
63
+ "vitest": "3.0.6",
63
64
  "xlsx": "^0.18.5"
64
65
  },
65
- "author": "Jack Halford",
66
+ "author": "Open3Cl",
66
67
  "license": "GPL-3.0",
67
68
  "bugs": {
68
69
  "url": "https://github.com/Open3CL/engine/issues"