Files
meteor/packages/deprecated/context/context-tests.js
2023-09-14 14:46:10 -03:00

13 lines
365 B
JavaScript

import { Tinytest } from "meteor/tinytest";
import { Slot } from "meteor/context";
Tinytest.add('context - basic Slot usage', function (test) {
const slot = new Slot();
test.equal(slot.hasValue(), false);
slot.withValue(123, () => {
test.equal(slot.hasValue(), true);
test.equal(slot.getValue(), 123);
});
test.equal(slot.hasValue(), false);
});