for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
jest.autoMockOff();
jest
/** global: jest */
This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.
To learn more about declaring variables in Javascript, see the MDN.
import Config from "../Config";
const equals = (actual, expected) => expect(actual).toBe(expected);
const instance = new Config();
test("Test Config", () => {
equals(instance.get("foo"), null);
equals(instance.get("foo", "x"), "x");
instance.set("foo", 10);
equals(instance.get("foo"), 10);
equals(instance.get("foo", "x"), 10);
});
This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.
To learn more about declaring variables in Javascript, see the MDN.