@ledgerhq/live-common
Version:
Common ground for the Ledger Live apps
18 lines • 807 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
/**
* @jest-environment jsdom
*/
const react_1 = require("@testing-library/react");
const mock_1 = require("./mock");
const FeatureFlagsContext_1 = require("./FeatureFlagsContext");
describe("useFeatureFlags hook", () => {
it("should return the context value if it is used inside a context provider", () => {
const mockedContextValue = (0, mock_1.makeMockedContextValue)({});
const { result } = (0, react_1.renderHook)(() => (0, FeatureFlagsContext_1.useFeatureFlags)(), {
wrapper: (0, mock_1.makeMockedFeatureFlagsProviderWrapper)(mockedContextValue),
});
expect(result?.current).toStrictEqual(mockedContextValue);
});
});
//# sourceMappingURL=FeatureFlagsContext.test.js.map