@constl/utils-tests 1.6.5 → 1.6.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.
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const version = "1.6.5";
1
+ export declare const version = "1.6.7";
package/dist/version.js CHANGED
@@ -1,3 +1,3 @@
1
1
  // Generated by genversion.
2
- export const version = "1.6.5";
2
+ export const version = "1.6.7";
3
3
  //# sourceMappingURL=version.js.map
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.6.5",
2
+ "version": "1.6.7",
3
3
  "license": "AGPL-3.0-or-later",
4
4
  "name": "@constl/utils-tests",
5
5
  "author": "Julien Jean Malard-Adam",
package/src/attente.ts CHANGED
@@ -40,6 +40,23 @@ export class AttendreRésultat<T> {
40
40
  return val;
41
41
  }
42
42
 
43
+ async attendreNexistePas(): Promise<void> {
44
+ if (this.val === undefined) return;
45
+
46
+ const id = uuidv4();
47
+
48
+ return new Promise((résoudre) => {
49
+ const fLorsqueChangé = async () => {
50
+ if (this.val === undefined) {
51
+ this.oublier(id);
52
+ résoudre();
53
+ }
54
+ };
55
+ this.événements.on("changé", fLorsqueChangé);
56
+ this.fsOublier[id] = () => this.événements.off("changé", fLorsqueChangé);
57
+ });
58
+ }
59
+
43
60
  oublier(id: string) {
44
61
  this.fsOublier[id]();
45
62
  delete this.fsOublier[id];
@@ -37,9 +37,7 @@ export const créerConstellationsTest = async <
37
37
  }
38
38
 
39
39
  const fOublier = async () => {
40
- await Promise.all(
41
- clients.map((client) => (client as Constellation).fermer()),
42
- );
40
+ for (const client of clients) await (client as Constellation).fermer();
43
41
  await Promise.all(fsOublier.map((f) => f()));
44
42
  };
45
43
  return { fOublier, clients, orbites };
package/src/version.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  // Generated by genversion.
2
- export const version = "1.6.5";
2
+ export const version = "1.6.7";