Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
;
;
// $ExpectError - i18nKey prop wrong type
;
// passing
reactI18nextModule.init(i18n);
reactI18nextModule.type;
// $ExpectError - no field property on reactI18nextModule
reactI18nextModule.field;
// passing
setDefaults({ wait: true });
// $ExpectError - setDefaults must be called with an object
setDefaults("option");
// $ExpectError - other is not a valid option
setDefaults({ other: true });
// passing
getDefaults();
// $ExpectError - no arguments should be passed to getDefaults
getDefaults("string");
// passing
getI18n();
// $ExpectError - no arguments should be passed to getI18n
getI18n("string");
// passing
setI18n(i18n);
// $ExpectError - setI18n must be called with an object
it("errors if passes a non-object or an invalid proeprty", () => {
// $ExpectError - setDefaults must be called with an object
setDefaults("option");
// $ExpectError - other is not a valid option
setDefaults({ other: true });
});
});
reactI18nextModule.field;
// passing
defaultOptions.wait;
defaultOptions.withRef;
defaultOptions.bindI18n;
defaultOptions.bindStore;
defaultOptions.translateFuncName;
defaultOptions.nsMode;
// $ExpectError - no field property on defaultOptions
defaultOptions.field;
// passing
setDefaults({ wait: true });
// $ExpectError - setDefaults must be called with an object
setDefaults("option");
// $ExpectError - other is not a valid option
setDefaults({ other: true });
// passing
getDefaults();
// $ExpectError - no arguments should be passed to getDefaults
getDefaults("string");
// passing
getI18n();
// $ExpectError - no arguments should be passed to getI18n
getI18n("string");
// passing
setI18n(i18n);
// $ExpectError - setI18n must be called with an object