![]() Server : Apache/2 System : Linux server-15-235-50-60 5.15.0-164-generic #174-Ubuntu SMP Fri Nov 14 20:25:16 UTC 2025 x86_64 User : gositeme ( 1004) PHP Version : 8.2.29 Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname Directory : /home/gositeme/domains/lavocat.quebec/private_html/node_modules/effect/dist/esm/ |
/**
* @since 2.0.0
*/
import * as Chunk from "./Chunk.js";
import * as Either from "./Either.js";
import * as Equal from "./Equal.js";
import { pipe } from "./Function.js";
import * as Hash from "./Hash.js";
import * as HashSet from "./HashSet.js";
import { getBugErrorMessage } from "./internal/errors.js";
import { hasProperty } from "./Predicate.js";
/** @internal */
const TestAnnotationSymbolKey = "effect/TestAnnotation";
/**
* @since 2.0.0
*/
export const TestAnnotationTypeId = /*#__PURE__*/Symbol.for(TestAnnotationSymbolKey);
/** @internal */
class TestAnnotationImpl {
identifier;
initial;
combine;
[TestAnnotationTypeId] = {
_A: _ => _
};
constructor(identifier, initial, combine) {
this.identifier = identifier;
this.initial = initial;
this.combine = combine;
}
[Hash.symbol]() {
return pipe(Hash.hash(TestAnnotationSymbolKey), Hash.combine(Hash.hash(this.identifier)), Hash.cached(this));
}
[Equal.symbol](that) {
return isTestAnnotation(that) && this.identifier === that.identifier;
}
}
/**
* @since 2.0.0
*/
export const isTestAnnotation = u => hasProperty(u, TestAnnotationTypeId);
/**
* @since 2.0.0
*/
export const make = (identifier, initial, combine) => {
return new TestAnnotationImpl(identifier, initial, combine);
};
/**
* @since 2.0.0
*/
export const compose = (left, right) => {
if (Either.isLeft(left) && Either.isLeft(right)) {
return Either.left(left.left + right.left);
}
if (Either.isRight(left) && Either.isRight(right)) {
return Either.right(pipe(left.right, Chunk.appendAll(right.right)));
}
if (Either.isRight(left) && Either.isLeft(right)) {
return right;
}
if (Either.isLeft(left) && Either.isRight(right)) {
return right;
}
throw new Error(getBugErrorMessage("TestAnnotation.compose"));
};
/**
* @since 2.0.0
*/
export const fibers = /*#__PURE__*/make("fibers", /*#__PURE__*/Either.left(0), compose);
/**
* An annotation which counts ignored tests.
*
* @since 2.0.0
*/
export const ignored = /*#__PURE__*/make("ignored", 0, (a, b) => a + b);
/**
* An annotation which counts repeated tests.
*
* @since 2.0.0
*/
export const repeated = /*#__PURE__*/make("repeated", 0, (a, b) => a + b);
/**
* An annotation which counts retried tests.
*
* @since 2.0.0
*/
export const retried = /*#__PURE__*/make("retried", 0, (a, b) => a + b);
/**
* An annotation which tags tests with strings.
*
* @since 2.0.0
*/
export const tagged = /*#__PURE__*/make("tagged", /*#__PURE__*/HashSet.empty(), (a, b) => pipe(a, HashSet.union(b)));
//# sourceMappingURL=TestAnnotation.js.map