);
});
+ it("[[Construct]] throws an error", () => {
+ assertThrows(() => new bind(function () {}));
+ });
+
describe(".name", () => {
it("[[Get]] returns the correct name", () => {
assertStrictEquals(bind.name, "bind");
);
});
+ it("[[Construct]] throws an error", () => {
+ assertThrows(() => new call(function () {}, null, []));
+ });
+
describe(".name", () => {
it("[[Get]] returns the correct name", () => {
assertStrictEquals(call.name, "call");
});
it("[[Call]] throws when the argument is not callable", () => {
- assertThrows(() => {
- completesNormally(null);
- });
+ assertThrows(() => completesNormally(null));
});
it("[[Call]] throws when the argument is not provided", () => {
- assertThrows(() => {
- completesNormally();
- });
+ assertThrows(() => completesNormally());
+ });
+
+ it("[[Construct]] throws an error", () => {
+ assertThrows(() => new completesNormally(function () {}));
});
describe(".name", () => {
);
});
+ it("[[Construct]] throws an error", () => {
+ assertThrows(() => new construct(function () {}, []));
+ });
+
describe(".name", () => {
it("[[Get]] returns the correct name", () => {
assertStrictEquals(construct.name, "construct");
assertStrictEquals(isCallable({}), false);
});
+ it("[[Construct]] throws an error", () => {
+ assertThrows(() => new isCallable(function () {}));
+ });
+
describe(".name", () => {
it("[[Get]] returns the correct name", () => {
assertStrictEquals(isCallable.name, "isCallable");
assertStrictEquals(isConstructor({}), false);
});
+ it("[[Construct]] throws an error", () => {
+ assertThrows(() => new isConstructor(function () {}));
+ });
+
describe(".name", () => {
it("[[Get]] returns the correct name", () => {
assertStrictEquals(isConstructor.name, "isConstructor");
);
});
+ it("[[Construct]] throws an error", () => {
+ assertThrows(() => new makeCallable(function () {}));
+ });
+
describe(".name", () => {
it("[[Get]] returns the correct name", () => {
assertStrictEquals(makeCallable.name, "makeCallable");
);
});
+ it("[[Construct]] throws an error", () => {
+ assertThrows(() => new ordinaryHasInstance(function () {}, {}));
+ });
+
describe(".name", () => {
it("[[Get]] returns the correct name", () => {
assertStrictEquals(