import { removeKey, setKey, getKey } from "../src/services/Keystore"; test('calls set keystore key', () => { return setKey('100', '100') .then((outcome) => { expect(outcome).toEqual(true); }); }); test('calls get keystore key', () => { return getKey('100') .then((outcome) => { expect(outcome).toEqual('1234567890'); }); }) test('calls remove keystore key', () => { return removeKey('100') .then((outcome) => { expect(outcome).toEqual(true); }); }) test('get non-existing keystore key', () => { return getKey('notakey') .then((outcome) => { expect(outcome).toEqual(null); }); }) test('remove non-existing keystore key', () => { return removeKey('notakey') .then((outcome) => { expect(outcome).toEqual(false); }); }) test('setKey handles case where settings fails', () => { return setKey('savefailed') .then((outcome) => { expect(outcome).toEqual(false); }); })